Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.04 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local character = player.Character
  3. -- Objects
  4.  
  5. local AdminMessage = Instance.new("BillboardGui")
  6. local Message = Instance.new("TextLabel")
  7.  
  8. -- Properties
  9.  
  10. AdminMessage.Name = "AdminMessage"
  11. AdminMessage.Parent = character.Head
  12. AdminMessage.AlwaysOnTop = true
  13. AdminMessage.ExtentsOffset = Vector3.new(0, 4, 0)
  14. AdminMessage.LightInfluence = 1
  15. AdminMessage.Size = UDim2.new(0, 200, 0, 50)
  16.  
  17. Message.Name = "Message"
  18. Message.Parent = AdminMessage
  19. Message.BackgroundColor3 = Color3.new(1, 1, 1)
  20. Message.BackgroundTransparency = 1
  21. Message.Size = UDim2.new(0, 200, 0, 50)
  22. Message.Font = Enum.Font.SciFi
  23. Message.TextColor3 = Color3.new(0.666667, 0, 0)
  24. Message.TextSize = 25
  25. Message.Text = "Coma update 7 fully loaded, "..player.Name.." type -cmds for a list of commands"
  26. wait(5)
  27. AdminMessage:remove()
  28.  
  29. player.Chatted:connect(function(Said)
  30. function split(inputstr, sep)
  31. if sep == nil then
  32. sep = "%s"
  33. end
  34. local t={} ; i=1
  35. for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  36. t[i] = str
  37. i = i + 1
  38. end
  39. return t
  40. end
  41. local args = split(Said) -- Default seperator is any whitespace
  42.  
  43. if Said == "-cmds" then
  44. local AdminMessage = Instance.new("BillboardGui")
  45. local Message = Instance.new("TextLabel")
  46.  
  47. -- Properties
  48.  
  49. AdminMessage.Name = "AdminMessage"
  50. AdminMessage.Parent = character.Head
  51. AdminMessage.AlwaysOnTop = true
  52. AdminMessage.ExtentsOffset = Vector3.new(0, 4, 0)
  53. AdminMessage.LightInfluence = 1
  54. AdminMessage.Size = UDim2.new(0, 200, 0, 50)
  55.  
  56. Message.Name = "Message"
  57. Message.Parent = AdminMessage
  58. Message.BackgroundColor3 = Color3.new(1, 1, 1)
  59. Message.BackgroundTransparency = 1
  60. Message.Size = UDim2.new(0, 200, 0, 50)
  61. Message.Font = Enum.Font.SciFi
  62. Message.TextColor3 = Color3.new(0.666667, 0, 0)
  63. Message.TextSize = 25
  64. Message.Text = "Coma Commands | ff [plr] | unff [plr] | god [plr] | ungod [plr] | kill [plr]\n | bighead [plr | fixhead [plr] | thin [plr] | unthin [plr] | speed [plr] [amount]\n | jumppower [plr] [amount] | hidecmds"
  65. end
  66.  
  67. if Said:sub(1, 4) == "-ff " then
  68. if Said:sub(5) == "me" then
  69. Instance.new("ForceField", character)
  70. end
  71. local TargetPlayer = game.Players:FindFirstChild(Said:sub(5))
  72. if TargetPlayer then
  73. local TargetCharacter = TargetPlayer.Character
  74. if TargetCharacter then
  75. Instance.new("ForceField", TargetCharacter)
  76. end
  77. end
  78. end
  79.  
  80. if Said:sub(1, 6) == "-unff " then
  81. if Said:sub(7) == "me" then
  82. character.ForceField:remove()
  83. end
  84. local TargetPlayer = game.Players:FindFirstChild(Said:sub(7))
  85. if TargetPlayer then
  86. local TargetCharacter = TargetPlayer.Character
  87. if TargetCharacter then
  88. TargetCharacter.ForceField:remove()
  89. end
  90. end
  91. end
  92.  
  93. if Said:sub(1, 5) == "-god " then
  94. if Said:sub(6) == "me" then
  95. character.Humanoid.MaxHealth = math.huge
  96. wait()
  97. character.Humanoid.Health = character.Humanoid.MaxHealth
  98. end
  99. local TargetPlayer = game.Players:FindFirstChild(Said:sub(6))
  100. if TargetPlayer then
  101. local TargetCharacter = TargetPlayer.Character
  102. if TargetCharacter then
  103. TargetCharacter.Humanoid.MaxHealth = math.huge
  104. wait()
  105. TargetCharacter.Humanoid.Health = TargetCharacter.Humanoid.MaxHealth
  106. end
  107. end
  108. end
  109.  
  110. if Said:sub(1, 7) == "-ungod " then
  111. if Said:sub(8) == "me" then
  112. character.Humanoid.MaxHealth = 100
  113. end
  114. local TargetPlayer = game.Players:FindFirstChild(Said:sub(8))
  115. if TargetPlayer then
  116. local TargetCharacter = TargetPlayer.Character
  117. if TargetCharacter then
  118. TargetCharacter.Humanoid.MaxHealth = 100
  119. end
  120. end
  121. end
  122.  
  123. if Said:sub(1, 6) == "-kill " then
  124. if Said:sub(7) == "me" then
  125. character.Humanoid.Health = 0
  126. end
  127. local TargetPlayer = game.Players:FindFirstChild(Said:sub(7))
  128. if TargetPlayer then
  129. local TargetCharacter = TargetPlayer.Character
  130. if TargetCharacter then
  131. TargetCharacter.Humanoid.Health = 0
  132. end
  133. end
  134. end
  135.  
  136. if Said:sub(1, 9) == "-bighead " then
  137. if Said:sub(10) == "me" then
  138. character.Head.Mesh.Scale = Vector3.new(2, 2, 2)
  139. end
  140. local TargetPlayer = game.Players:FindFirstChild(Said:sub(10))
  141. if TargetPlayer then
  142. local TargetCharacter = TargetPlayer.Character
  143. if TargetCharacter then
  144. TargetCharacter.Head.Mesh.Scale = Vector3.new(2, 2, 2)
  145. end
  146. end
  147. end
  148.  
  149. if Said:sub(1, 9) == "-fixhead " then
  150. if Said:sub(10) == "me" then
  151. character.Head.Mesh.Scale = Vector3.new(2, 1, 1)
  152. end
  153. local TargetPlayer = game.Players:FindFirstChild(Said:sub(10))
  154. if TargetPlayer then
  155. local TargetCharacter = TargetPlayer.Character
  156. if TargetCharacter then
  157. TargetCharacter.Head.Mesh.Scale = Vector3.new(2, 1, 1)
  158. end
  159. end
  160. end
  161.  
  162. if Said:sub(1, 6) == "-thin " then
  163. if Said:sub(7) == "me" then
  164. character.Humanoid.BodyDepthScale.Value = 0.1
  165. end
  166. local TargetPlayer = game.Players:WaitForChild(Said:sub(7))
  167. if TargetPlayer then
  168. local TargetCharacter = TargetPlayer.Character
  169. if TargetCharacter then
  170. TargetCharacter.Humanoid.BodyDepthScale.Value = 0.1
  171. end
  172. end
  173. end
  174.  
  175. if Said:sub(1, 8) == "-unthin " then
  176. if Said:sub(9) == "me" then
  177. character.Humanoid.BodyDepthScale.Value = 0.92000001668930053711
  178. end
  179. local TargetPlayer = game.Players:WaitForChild(Said:sub(9))
  180. if TargetPlayer then
  181. local TargetCharacter = TargetPlayer.Character
  182. if TargetCharacter then
  183. TargetCharacter.Humanoid.BodyDepthScale.Value = 0.92000001668930053711
  184. end
  185. end
  186. end
  187.  
  188. if args[1] == "-speed" then
  189. -- Player said -speed
  190. table.remove(args, 1) -- Remove the command
  191. local targetName = args[1]
  192. local speed = args[2]
  193. local player = game:GetService("Players"):FindFirstChild(targetName)
  194. if targetName == "me" then
  195. character.Humanoid.WalkSpeed = speed
  196. end
  197. if player then
  198. local char = player.Character or player.CharacterAdded:wait()
  199. while not char:FindFirstChildOfClass("Humanoid") do
  200. game:GetService("RunService").Stepped:wait() -- This is NOT the same as RenderStepped and will work server side
  201. end
  202. local hum = char:FindFirstChildOfClass("Humanoid")
  203. hum.WalkSpeed = speed
  204. end
  205. end
  206.  
  207. if args[1] == "-jumppower" then
  208. -- Player said -speed
  209. table.remove(args, 1) -- Remove the command
  210. local targetName = args[1]
  211. local power = args[2]
  212. local player = game:GetService("Players"):FindFirstChild(targetName)
  213. if targetName == "me" then
  214. character.Humanoid.JumpPower = power
  215. end
  216. if player then
  217. local char = player.Character or player.CharacterAdded:wait()
  218. while not char:FindFirstChildOfClass("Humanoid") do
  219. game:GetService("RunService").Stepped:wait() -- This is NOT the same as RenderStepped and will work server side
  220. end
  221. local hum = char:FindFirstChildOfClass("Humanoid")
  222. hum.JumpPower = power
  223. end
  224. end
  225.  
  226. if Said == "-hidecmds" then
  227. character.Head.AdminMessage:remove()
  228. end
  229.  
  230. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement