Virtuex
|
  |
| Joined: 23 Mar 2011 |
| Total Posts: 4056 |
|
|
| 19 Jun 2012 06:03 PM |
So, my attempt at the Gui brick completely failed. But, here's what I will try to do. I want this brick to give you something from the Lighting. But it also cost Money or KOs, whatever. It also changes speed.
function onTouched(Part) b = game.Workspace.FunctionPart -- changeable name s = game.Workspace.Player.Walskpeed if game.Workspace.Player.LeaderBoard.KOs = <100 then do break but if game.Workspace.Player.LeaderBoard.KOs = >99 then do if b.Connect["Humanoid"] then s = 50 and if b.Connect["Humanoid"] then game.Workspace.Player.Starterpack.Add game.Lighting.ToolName end end end end end
Hit.connect() |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:15 PM |
| i hope you notice theres a typo at game.Workspace.Player.*Walkspeed* |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2012 06:23 PM |
Ok... I'm going to try...
Edit the top variables to suit your needs.
price = 100 speed = 50 item = "ToolName" function onTouched(Part) if Part.Parent and Part.Parent:FindFirstChild("Humanoid") then local p = Game.Players:GetPlayerFromCharacter(Part.Parent) if p.leaderstats.KOs.Value >= price then p.leaderstats.KOs.Value = p.leaderstats.KOs.Value - price Game.Lighting[ToolName]:Clone().Parent = p.Backpack Part.Parent.Humanoid.WalkSpeed = speed end end end script.Parent.Touched:connect(onTouched)
† KMXD † |
|
|
| Report Abuse |
|
|