generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Keep tools script.

Previous Thread :: Next Thread 
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 09:00 AM
None of the keep tools scripts work! Can somebody find me an ACTUAL working keep tools script.

PS: If you don't know what keep tools is, it is a weapon saving script when you die.
Report Abuse
Scythedonut is not online. Scythedonut
Joined: 25 Nov 2007
Total Posts: 5191
09 Mar 2014 09:17 AM
Use startergear. Keep tools script is old news.
Report Abuse
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 09:21 AM
Yeah, but I have a shop.
Report Abuse
Scythedonut is not online. Scythedonut
Joined: 25 Nov 2007
Total Posts: 5191
09 Mar 2014 09:24 AM
then make the shop insert the item into Backpack and StarterGear
Report Abuse
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 09:35 AM
Is there a script for this?
Report Abuse
GFXdylan is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
09 Mar 2014 09:46 AM
Lord, paste ur shop script and i'll add it.
Report Abuse
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 11:03 AM
Okay.
Report Abuse
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 11:04 AM
print("Hello World!")

Door = script.Parent
local debounce = false

function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end
function onTouched(hit)
if debounce == false then
local human = hit.Parent:findFirstChild("Humanoid")
if (human == nil) then return end
local player = getPlayer(human)
debounce = true
if (player == nil) then return end
local stats = player:findFirstChild("leaderstats")
local sp = stats:findFirstChild("KOs")
if sp == nil then return false end
if (sp.Value >=2) then --Amount of how much the weapon will go for,Change "100".
sp.Value = sp.Value - 2 --Put the same exact number here as you did above.
print("Enough Money")
game.Lighting.BambooKatana:clone().Parent = player.Backpack
Door.BrickColor = BrickColor.new(21)
wait(2)
Door.BrickColor = BrickColor.new(37)
debounce = false
else debounce = false
end
end

end

connection = Door.Touched:connect(onTouched)
Report Abuse
BlackKnightXx is not online. BlackKnightXx
Joined: 03 Nov 2010
Total Posts: 5526
09 Mar 2014 11:20 AM
game.Lighting.BambooKatana:clone().Parent = player.StarterGear
Report Abuse
GFXdylan is not online. GFXdylan
Joined: 09 Feb 2013
Total Posts: 679
09 Mar 2014 11:20 AM


03-09-2014 09:04 AM
print("Hello World!")

Door = script.Parent
local debounce = false

function getPlayer(humanoid)
local players = game.Players:children()
for i = 1, #players do
if players[i].Character.Humanoid == humanoid then return players[i] end
end
return nil
end
function onTouched(hit)
if debounce == false then
local human = hit.Parent:findFirstChild("Humanoid")
if (human == nil) then return end
local player = getPlayer(human)
debounce = true
if (player == nil) then return end
local stats = player:findFirstChild("leaderstats")
local sp = stats:findFirstChild("KOs")
if sp == nil then return false end
if (sp.Value >=2) then --Amount of how much the weapon will go for,Change "100".
sp.Value = sp.Value - 2 --Put the same exact number here as you did above.
print("Enough Money")
game.Lighting.BambooKatana:clone().Parent = player.Backpack
game.Lighting.BambooKatana:clone().Parent = player.StarterGear
Door.BrickColor = BrickColor.new(21)
wait(2)
Door.BrickColor = BrickColor.new(37)
debounce = false
else debounce = false
end
end

end

connection = Door.Touched:connect(onTouched)
Report Abuse
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 11:40 AM
Oh! :p! thanks!
Report Abuse
LordDestroyerChaos is not online. LordDestroyerChaos
Joined: 03 Jun 2012
Total Posts: 5742
09 Mar 2014 11:41 AM
How about this?

function saveWeapons(player)
local bin = Instance.new("HopperBin")
bin.Parent = game.Lighting
bin.Name = player.Name
local stuff = player.Backpack:GetChildren()
for i = 1,#stuff do
local name = stuff[i].Name
if game.StarterPack:findFirstChild(name)==nil then
stuff[i]:Clone().Parent = bin
end
end
local char = player.Character:GetChildren()
for i = 1,#char do
if char[i].className == "Tool" then
local name = char[i].Name
if game.StarterPack:findFirstChild(name)==nil then
char[i]:Clone().Parent = bin
end
end
end
end

function onRespawned(player)
local findBin = game.Lighting:findFirstChild(player.Name)
if findBin~=nil then
local stuff = findBin:GetChildren()
for i = 1,#stuff do
stuff[i]:Clone().Parent = player.Backpack
end
findBin:Remove()
end
player.Character.Humanoid.Died:connect(function()
saveWeapons(player)
end)
end

function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onRespawned(newPlayer)
end
end)
while true do
if newPlayer.Character~=nil then break end
wait()
end
newPlayer.Character.Humanoid.Died:connect(function()
saveWeapons(newPlayer)
end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
Scythedonut is not online. Scythedonut
Joined: 25 Nov 2007
Total Posts: 5191
09 Mar 2014 11:44 AM
Have you not listened to us? You don't need a save weapon script anymore. That's like 5 years old now. Just use the scripts they gave you that puts the weapons into the startergear.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image