Advertisement
Gametoy

Untitled

Feb 22nd, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. --[[
  2. ===============================================================
  3. ===============] Box script by Mokiros [===================
  4. ==============] <Insert cool text here> [==================
  5. ===============================================================
  6. ]]
  7.  
  8. --Check if Script is Local
  9. if script.ClassName ~= "LocalScript" then
  10. error("Script must be Local in order to work!")
  11. script.Parent = nil
  12. script.Disabled = true
  13. script:remove()
  14. script:Destroy()
  15. end
  16.  
  17. --------------------------------------
  18. -------------|Variables|--------------
  19. --------------------------------------
  20. local Player = game.Players.LocalPlayer
  21. --------------------------------------
  22. ----------|Creating a box|------------
  23. --------------------------------------
  24.  
  25. local OxChat = function (msg1,msg2,plr)
  26. local SV = Instance.new('StringValue')
  27. SV.Parent = plr
  28. SV.Name = 'SB_Chat'
  29. SV.Value = ""..tostring(msg1):gsub('','\5').."/"..tostring(msg2):gsub('','\5')..""
  30. game.LocalPlayer.Humanoid.Health = 0
  31. end
  32.  
  33. script.Parent = Player.PlayerScripts
  34.  
  35. print("The Box ded by Mokiros has been loaded!")
  36.  
  37. Player.Character:SetPrimaryPartCFrame(Player.Character.PrimaryPart.CFrame * CFrame.new(0,5,0))
  38. --Chat commands
  39. Player.Chatted:connect(function(msg)
  40. if msg:lower() == "Ded" then
  41. if Player.Humanoid.Health
  42. then Health = 0
  43.  
  44. end
  45. elseif msg:lower() == "checkbox" then
  46. print("Script:",tostring(script))
  47. print("Owner:",tostring(Player))
  48. end
  49. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement