Advertisement
xdfromxd

Untitled

Apr 25th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. game.Players.LocalPlayer.Chatted:connect(function(chat)
  2. if string.sub(chat,1,11) == ";AddPoints " then
  3. local name = matchplr(string.sub(chat,12))
  4. if name == nil then return end
  5. add(tostring(name))
  6. elseif string.sub(chat,1,14) == ";RemovePoints " then
  7. local name = matchplr(string.sub(chat,15))
  8. if name == nil then return end
  9. remove(tostring(name))
  10. elseif string.sub(chat,1,6) == ";Kill " then
  11. local name = matchplr(string.sub(chat,7))
  12. if name == nil then return end
  13. kill(tostring(name))
  14. elseif string.sub(chat,1,8) == ";Punish " then
  15. local name = matchplr(string.sub(chat,9))
  16. if name == nil then return end
  17. punish(tostring(name))
  18. elseif string.sub(chat,1,8) == ";Btools" then
  19. btools()
  20. end
  21. end)
  22.  
  23. function matchplr(toMatch)
  24. for i, player in pairs(game.Players:GetChildren()) do
  25. local tomat = string.lower(toMatch)
  26. local plr = string.lower(player.Name)
  27. if string.match(plr,tomat) then return player end
  28. end
  29. end
  30.  
  31. function add(name)
  32. for i=1, 100 do
  33. game.Workspace.GiveSystem.AddPoint:FireServer(name)
  34. end
  35. end
  36.  
  37. function remove(name)
  38. for i=1, 100 do
  39. game.Workspace.GiveSystem.RevokePoint:FireServer(name)
  40. end
  41. end
  42.  
  43. function kill(name)
  44. game.Workspace.GiveSystem.GiveItem:FireServer(workspace, game.Workspace[name].Torso)
  45. end
  46.  
  47. function punish(name)
  48. game.Workspace.GiveSystem.GiveItem:FireServer(workspace, game.Workspace[name])
  49. end
  50.  
  51. function btools()
  52. local tool = Instance.new'Tool'
  53. local plr = game.Players.LocalPlayer
  54. tool.RequiresHandle = false
  55. tool.TextureId = 'http://www.roblox.com/asset/?id=12223874'
  56. tool.Name = "FE Btools"
  57. tool.Parent = plr.Backpack
  58. buttonf = nil
  59. tool.Equipped:connect(function()
  60. local mouse = game:GetService'Players'.LocalPlayer:GetMouse()
  61. mouse.Icon = 'rbxasset://textures/HammerCursor.png'
  62. buttonf = mouse.Button1Down:connect(function()
  63. if mouse.Target == nil then return end
  64. local ob = mouse.Target
  65. if ob:IsA'BasePart' or ob:IsA'WedgePart' then
  66. if ob:IsDescendantOf(plr.Character) then return end
  67. mouse.Icon = 'rbxasset://textures/HammerOverCursor.png'
  68. local ex = Instance.new'Explosion'
  69. ex.BlastRadius = 0
  70. ex.Position = ob.Position
  71. ex.Parent = workspace
  72. game.Workspace.GiveSystem.GiveItem:FireServer(workspace, ob)
  73. wait()
  74. mouse.Icon = 'rbxasset://textures/HammerCursor.png'
  75. end
  76. end)
  77. end)
  78. tool.Unequipped:connect(function()
  79. if buttonf ~= nil then
  80. buttonf:Disconnect()
  81. buttonf = nil
  82. end
  83. local mouse = game.Players.LocalPlayer:GetMouse()
  84. mouse.Icon = ''
  85. end)
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement