User:Outofspace/Gus-Bot: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Outofspace
mNo edit summary
>Outofspace
2.7b It's now simpler to set Gus to follow you. Just edit it at the top.
Line 20: Line 20:
--[[
--[[
       By outofspace
       By outofspace
       Revision 2.65b
       Revision 2.7b
--]]
--]]
BotName = "Gus" --Set your pets name here.
 
UserName = "outofspace" --DO NOT TOUCH
local sss = Instance.new("Script")
sss.Parent = game.Workspace
sss.Name = "RemoveOldGus"
sss.Source =[[
 
c = game.Workspace:GetChildren()
 
for i=1,#c do
if c[i].className == "Model" then c[i]:BreakJoints() end
end
 
wait(1)
 
script:Remove()
 
]]
 
sssa = sss:clone()
sss:Remove()
sssa.Parent = game.Workspace
 
-
 
BotName = "Gus" --Put your pets name here.
UserName = game.Workspace.outofspace.Head --Replace outofspace with your name.
----
----
----
----
Line 54: Line 78:
local h = Instance.new("Humanoid")
local h = Instance.new("Humanoid")
h.Parent = game.Workspace.Gus
h.Parent = game.Workspace.Gus
--[[
Self heal script
--]]
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.Gus
sa.Parent = game.Workspace.Gus
Line 92: Line 123:
local bav = Instance.new("BodyAngularVelocity")
local bav = Instance.new("BodyAngularVelocity")
bav.Parent = game.Workspace.Gus.Head
bav.Parent = game.Workspace.Gus.Head
--[[
Rocket Propulsion
--]]
local sd = Instance.new("Script")
local sd = Instance.new("Script")
sd.Parent = game.Workspace.Gus.Head
sd.Parent = game.Workspace.Gus.Head
Line 98: Line 136:
while true do
while true do
script.Parent = game.Workspace.Gus.Head
script.Parent = game.Workspace.Gus.Head
script.Parent.RP.Target = game.Workspace.outofspace.Head --Replace outofspace with your name.
script.Parent.RP.Target = nil
script.Parent.RP:Fire()
script.Parent.RP:Fire()
wait(0.1)
wait(0.1)
Line 106: Line 144:
sd:Remove()
sd:Remove()
sdd.Parent = game.Workspace.Gus.Head
sdd.Parent = game.Workspace.Gus.Head
--[[
Touch to Heal script
--]]
local sb = Instance.new("Script") --Touch to heal script.
local sb = Instance.new("Script") --Touch to heal script.
sb.Parent = game.Workspace.Gus.Head
sb.Parent = game.Workspace.Gus.Head
Line 123: Line 168:
sbd.Parent = game.Workspace.Gus.Head
sbd.Parent = game.Workspace.Gus.Head
sbd.Name = "Touch-Heal-Script"
sbd.Name = "Touch-Heal-Script"
game.Workspace.Gus.Name = game.Workspace.Gus.SETTINGS.NameBot.Value
 
game.Workspace.Gus.Name = game.Workspace.Gus.SETTINGS.NameBot.Value --Sets name
game.Workspace.Gus.Head.RP.Target = UserName
</pre>
</pre>

Revision as of 17:00, 13 October 2008

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

Features

  • Follows you around.

Future Plans

  • Improving Healing others on touch.
  • Improving Healing itself
  • Add/Fix add sparkle command.
  • Self Destruct; Self Remove.
  • Ability to shoot rockets.

Script

--[[
      By outofspace
      Revision 2.7b
--]]

local sss = Instance.new("Script")
sss.Parent = game.Workspace
sss.Name = "RemoveOldGus"
sss.Source =[[

c = game.Workspace:GetChildren()

for i=1,#c do
	if c[i].className == "Model" then c[i]:BreakJoints() end
end

wait(1)

script:Remove()

]]

sssa = sss:clone()
sss:Remove()
sssa.Parent = game.Workspace

-

BotName = "Gus" --Put your pets name here.
UserName = game.Workspace.outofspace.Head --Replace outofspace with your name.
----
----
----
----
script.Name = "GusScript"
local m = Instance.new("Model")
m.Name = "Gus"
m.Parent = game.Workspace
local ma = Instance.new("Model")
ma.Parent = game.Workspace.Gus
ma.Name = "SETTINGS"
local sva = Instance.new("StringValue")
sva.Name = "NameBot"
sva.Parent = game.Workspace.Gus.SETTINGS
sva.Value = BotName
local svb = Instance.new("StringValue")
svb.Name = "NameUser"
svb.Parent = game.Workspace.Gus.SETTINGS
svb.Value = UserName
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

--[[

Self heal script

--]]

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 bav = Instance.new("BodyAngularVelocity")
bav.Parent = game.Workspace.Gus.Head

--[[

Rocket Propulsion

--]]

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 = nil
script.Parent.RP:Fire()
wait(0.1)
end
]]
sdd = sd:clone()
sd:Remove()
sdd.Parent = game.Workspace.Gus.Head

--[[

Touch to Heal script

--]]

local sb = Instance.new("Script") --Touch 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)
 else end
 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"

game.Workspace.Gus.Name = game.Workspace.Gus.SETTINGS.NameBot.Value --Sets name
game.Workspace.Gus.Head.RP.Target = UserName