User:Outofspace/Gus-Bot: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Outofspace
→‎Script: - Script 2.6b
>Outofspace
revert - Too many errors X_X
Line 19: Line 19:
<pre>
<pre>
--By outofspace
--By outofspace
--Revision 2.6b
--Revision 2.55b
UserName = "outofspace" --change to your name.
BotName = "Gus" --option, change to your pets name.
----
----
--LEAVE THE BOTTOM ALONE---
----
----
script.Name = "GusScript"
script.Name = "GusScript"
local m = Instance.new("Model")
local m = Instance.new("Model")
m.Name = BotName
m.Name = "Gus"
m.Parent = game.Workspace
m.Parent = game.Workspace
local b = Instance.new("Part")  
local b = Instance.new("Part")  
b.Parent = game.Workspace.BotName
b.Parent = game.Workspace.Gus
b.Locked = true
b.Locked = true
b.Name = "Head"
b.Name = "Head"
Line 38: Line 31:
b.CanCollide = true
b.CanCollide = true
local rp = Instance.new("RocketPropulsion")
local rp = Instance.new("RocketPropulsion")
rp.Parent = game.Workspace.BotName.Head
rp.Parent = game.Workspace.Gus.Head
rp.Name = "RP"
rp.Name = "RP"
local h = Instance.new("Humanoid")
local h = Instance.new("Humanoid")
h.Parent = game.Workspace.BotName
h.Parent = game.Workspace.Gus
local sa = Instance.new("Script") --creates a self healing script. (for gus)
local sa = Instance.new("Script") --creates a self healing script. (for gus)
sa.Parent = game.Workspace.BotName
sa.Parent = game.Workspace.Gus
sa.Source =[[
sa.Source =[[
function waitForChild(parent, childName)
function waitForChild(parent, childName)
Line 76: Line 69:
sad = sa:clone()
sad = sa:clone()
sa:Remove() --Removes the old script
sa:Remove() --Removes the old script
sad.Parent = game.Workspace.BotName --Replaces the old script
sad.Parent = game.Workspace.Gus --Replaces the old script
sad.Name = "HealingScript"
sad.Name = "HealingScript"
local sd = Instance.new("Script")
local sd = Instance.new("Script")
sd.Parent = game.Workspace.BotName.Head
sd.Parent = game.Workspace.Gus.Head
sd.Source = [[
sd.Source = [[
script.Name = "FollowScript"
script.Name = "FollowScript"
while true do
while true do
script.Parent = game.Workspace.BotName.Head
script.Parent = game.Workspace.Gus.Head
script.Parent.RP.Target = game.Workspace.UserName.Head --Replace outofspace with your name.
script.Parent.RP.Target = game.Workspace.outofspace.Head --Replace outofspace with your name.
script.Parent.RP:Fire()
script.Parent.RP:Fire()
wait(0.1)
wait(0.1)
Line 91: Line 84:
sdd = sd:clone()
sdd = sd:clone()
sd:Remove()
sd:Remove()
sdd.Parent = game.Workspace.BotName.Head
sdd.Parent = game.Workspace.Gus.Head
local sb = Instance.new("Script") --Youch to heal script.
local sb = Instance.new("Script") --Youch to heal script.
sb.Parent = game.Workspace.BotName.Head
sb.Parent = game.Workspace.Gus.Head
sb.Source =[[
sb.Source =[[
function onTouched(part)
function onTouched(part)
Line 106: Line 99:
sbd = sb:clone()
sbd = sb:clone()
sb:Remove()
sb:Remove()
sbd.Parent = game.Workspace.BotName.Head
sbd.Parent = game.Workspace.Gus.Head
sbd.Name = "Touch-Heal-Script"
sbd.Name = "Touch-Heal-Script"
--The following is currently disabled.
--The following is currently disabled.
--[[
--[[
local sc = Instance.new("Script") --Adds rotaion part.
local sc = Instance.new("Script") --Adds rotaion part.
sc.Parent = game.Workspace.BotName
sc.Parent = game.Workspace.Gus
sc.Source =[[
sc.Source =[[
vip = game.Players.outofspace --Your name here
vip = game.Players.outofspace --Your name here
Line 117: Line 110:
  if msg == "sparkles/on" then
  if msg == "sparkles/on" then
  local ppp = Instance.new("Sparkles")
  local ppp = Instance.new("Sparkles")
  ppp.Parent = game.Workspace.BotName.Head
  ppp.Parent = game.Workspace.Gus.Head
  ppp.Color = Color3.new(0;0;255)
  ppp.Color = Color3.new(0;0;255)
end
end
if msg == "sparkles/off" then
if msg == "sparkles/off" then
  game.Workspace.BotName.Head.Sparkles:Remove()
  game.Workspace.Gus.Head.Sparkles:Remove()
end
end
end
end
Line 128: Line 121:
scd = sc:clone()
scd = sc:clone()
sc:Remove()
sc:Remove()
scd.Parent = game.Workspace.BotName
scd.Parent = game.Workspace.Gus
scd.Name = "SparkleCommands"
scd.Name = "SparkleCommands"
--]]
--]]
</pre>
</pre>

Revision as of 22:41, 25 August 2008

This is a script I'm working on. Feel free to use it and modify it.

Features

  • Heals itself
  • Heals others on touch.
  • Follows you around.

Future Plans

  • Add/Fix add sparkle command.
  • Self Destruct; Self Remove.
  • Ability to shoot rockets.

Script

--By outofspace
--Revision 2.55b
script.Name = "GusScript"
local m = Instance.new("Model")
m.Name = "Gus"
m.Parent = game.Workspace
local b = Instance.new("Part") 
b.Parent = game.Workspace.Gus
b.Locked = true
b.Name = "Head"
b.Position = Vector3.new(-14.5, 103, -10)
b.CanCollide = true
local rp = Instance.new("RocketPropulsion")
rp.Parent = game.Workspace.Gus.Head
rp.Name = "RP"
local h = Instance.new("Humanoid")
h.Parent = game.Workspace.Gus
local sa = Instance.new("Script") --creates a self healing script. (for gus)
sa.Parent = game.Workspace.Gus
sa.Source =[[
function waitForChild(parent, childName)
	local child = parent:findFirstChild(childName)
	if child then return child end
	while true do
		child = parent.ChildAdded:wait()
		if child.Name==childName then return child end
	end
end

-- declarations

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")

-- regeneration
while true do
	local s = wait(1)
	local health = Humanoid.Health
	if health > -1 and health < Humanoid.MaxHealth then
		health = health + 0.05 * s * Humanoid.MaxHealth
		if health * 1.05 < Humanoid.MaxHealth then
			Humanoid.Health = health
		else
			Humanoid.Health = Humanoid.MaxHealth
		end
	end
end
]]
sad = sa:clone()
sa:Remove() --Removes the old script
sad.Parent = game.Workspace.Gus --Replaces the old script
sad.Name = "HealingScript"
local sd = Instance.new("Script")
sd.Parent = game.Workspace.Gus.Head
sd.Source = [[
script.Name = "FollowScript"
while true do
script.Parent = game.Workspace.Gus.Head
script.Parent.RP.Target = game.Workspace.outofspace.Head --Replace outofspace with your name.
script.Parent.RP:Fire()
wait(0.1)
end
]]
sdd = sd:clone()
sd:Remove()
sdd.Parent = game.Workspace.Gus.Head
local sb = Instance.new("Script") --Youch to heal script.
sb.Parent = game.Workspace.Gus.Head
sb.Source =[[
function onTouched(part)
 local h = part.Parent:findFirstChild(Humanoid) -- Find Humanoids in whatever touched this
 if (h ~=nil) then -- If there is a Humanoid then
       h.Health = h.MaxHealth -- Set the health to maximum (full healing)
 end
 end

script.Parent.Touched:connect(onTouched) -- Make it call onTouched when touched
]]
sbd = sb:clone()
sb:Remove()
sbd.Parent = game.Workspace.Gus.Head
sbd.Name = "Touch-Heal-Script"
--The following is currently disabled.
--[[
local sc = Instance.new("Script") --Adds rotaion part.
sc.Parent = game.Workspace.Gus
sc.Source =[[
vip = game.Players.outofspace --Your name here
function onChatted(msg)
 if msg == "sparkles/on" then
 local ppp = Instance.new("Sparkles")
 ppp.Parent = game.Workspace.Gus.Head
 ppp.Color = Color3.new(0;0;255)
end
if msg == "sparkles/off" then
 game.Workspace.Gus.Head.Sparkles:Remove()
end
end
vip.Chatted:connect(onChatted)
]]
scd = sc:clone()
sc:Remove()
scd.Parent = game.Workspace.Gus
scd.Name = "SparkleCommands"
--]]