Advertisement
Verhed

Untitled

Jul 5th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.29 KB | None | 0 0
  1. -- Caeso
  2.  
  3. local player=game.Players.LocalPlayer
  4. local commands={}
  5.  
  6. function AddCommand(cmd,func)
  7. local newcommand=function (args)
  8. pcall(function ()
  9. func(args)
  10. end)
  11. end
  12. commands[cmd]=newcommand
  13. end
  14.  
  15. function create(class)
  16. local inst=Instance.new(class)
  17. return function (args)
  18. for name,value in pairs(args) do
  19. inst[name]=value
  20. end
  21.  
  22. return inst
  23. end
  24. end
  25.  
  26. function Error(msg)
  27. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  28. Text = msg;
  29. Color = Color3.fromRGB(100,0,0);
  30. Font = Enum.Font.SourceSans;
  31. FontSize = Enum.FontSize.Size18;
  32. })
  33. end
  34.  
  35. function FindPlayers(str)
  36. local t={}
  37. if str~="me" and str~="others" and str~="all" then
  38. for _,plr in pairs(game.Players:GetPlayers()) do
  39. if string.find(plr.Name:lower(),str:lower()) then
  40. t[#t+1]=plr
  41. end
  42. end
  43. else
  44. if str=="me" then
  45. return {player}
  46. elseif str=="others" then
  47. for _,plr in pairs(game.Players:GetPlayers()) do
  48. if plr~=player then
  49. t[#t+1]=plr
  50. end
  51. end
  52.  
  53. return t
  54. elseif str=="all" then
  55. return game.Players:GetPlayers()
  56. end
  57. end
  58.  
  59. return t
  60. end
  61.  
  62. local filtering=workspace.FilteringEnabled and "Enabled" or "Disabled"
  63. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  64. Text = "Caeso Admin loaded\nFiltering is " .. filtering .. "\nTIP: put '/' before a command to make it silent\nie. '/ !kill noob'";
  65. Color = Color3.fromRGB(0,0,80);
  66. Font = Enum.Font.SourceSans;
  67. FontSize = Enum.FontSize.Size18;
  68. })
  69.  
  70. AddCommand("kill",function (arguments)
  71. local players=FindPlayers(arguments[2])
  72. for _,plr in pairs(players) do
  73. pcall(function ()
  74. plr.Character:FindFirstChild("Humanoid").Health=0
  75. end)
  76. end
  77. end)
  78.  
  79. AddCommand("kick",function (arguments)
  80. local player2=FindPlayers(arguments[2])
  81. for _,v in pairs(player2) do
  82. if v~=player then
  83. v:Kick()
  84. end
  85. end
  86. end)
  87.  
  88. AddCommand("sparkles",function (arguments)
  89. local player2=FindPlayers(arguments[2])
  90. for _,v in pairs(player2) do
  91. Instance.new("Sparkles",v.Character.Torso)
  92. end
  93. end)
  94.  
  95. AddCommand("fire",function (arguments)
  96. local player2=FindPlayers(arguments[2])
  97. for _,v in pairs(player2) do
  98. Instance.new("Fire",v.Character.Torso)
  99. end
  100. end)
  101.  
  102. AddCommand("smoke",function (arguments)
  103. local player2=FindPlayers(arguments[2])
  104. for _,v in pairs(player2) do
  105. Instance.new("Smoke",v.Character.Torso)
  106. end
  107. end)
  108.  
  109. AddCommand("respawn",function (arguments)
  110. local players=FindPlayers(arguments[2])
  111. if #players>0 then
  112. for _,plr in pairs(players) do
  113. plr:LoadCharacter()
  114. end
  115. end
  116. end)
  117.  
  118. AddCommand("tp",function (arguments)
  119. local playerToTp=FindPlayers(arguments[2])[1]
  120. local playerToTpTo=FindPlayers(arguments[3])[1]
  121. playerToTp:MoveTo(playerToTpTo.Torso.Position+Vector3.new(0,3,0))
  122. end)
  123.  
  124. AddCommand("stealhats",function (arguments)
  125. local player2steal=FindPlayers(arguments[2])[1]
  126. for _,v in pairs(player.Character:GetChildren()) do
  127. if v.className=="Hat" then v:Destroy() end
  128. end
  129. for _,v in pairs(player2steal.Character:GetChildren()) do
  130. if v.className=="Hat" then v.Parent=player.Character end
  131. end
  132. end)
  133.  
  134. AddCommand("bon",function (arguments) -- <3
  135. local playerToBonify=FindPlayers(arguments[2])[1]
  136. local char=playerToBonify.Character
  137. for _,v in pairs(playerToBonify.Character:GetChildren()) do
  138. if v:IsA("Shirt") or v:IsA("Hat") or v:IsA("Pants") or v:IsA("CharacterMesh") then
  139. v:Destroy()
  140. end
  141. if v:IsA("BasePart") then
  142. v.BrickColor=BrickColor.Black()
  143. end
  144. end
  145. do -- fedora
  146. local h = Instance.new("Hat")
  147. local p = Instance.new("Part")
  148. h.Name = "Fedora"
  149. p.Parent = h
  150. p.Position = char.Head.Position
  151. p.Name = "Handle"
  152. p.Size = Vector3.new(2, 2, 2)
  153. p.BottomSurface = 0
  154. p.TopSurface = 0
  155. local m=Instance.new("SpecialMesh")
  156. m.MeshId="http://www.roblox.com/asset/?id=13640868"
  157. m.TextureId="http://www.roblox.com/asset/?id=38405114"
  158. m.Parent=p
  159. h.Parent = char
  160. h.AttachmentForward = Vector3.new(-0, -0.0995, -0.995)
  161. h.AttachmentPos = Vector3.new(0, -0.25, 0)
  162. h.AttachmentRight = Vector3.new(1,0,0)
  163. h.AttachmentUp = Vector3.new(0, 0.995, -0.0995)
  164. end
  165. do -- shades
  166. local h = Instance.new("Hat")
  167. local p = Instance.new("Part")
  168. h.Name = "Shades"
  169. p.Parent = h
  170. p.Position = char.Head.Position
  171. p.Name = "Handle"
  172. p.Size = Vector3.new(2, 1, 1)
  173. p.BottomSurface = 0
  174. p.TopSurface = 0
  175. local m=Instance.new("SpecialMesh")
  176. m.MeshId="http://www.roblox.com/asset/?id=1577360"
  177. m.TextureId="http://www.roblox.com/asset/?id=267871019"
  178. m.Parent=p
  179. h.Parent = char
  180. h.AttachmentPos = Vector3.new(0, 0.25, 0.15)
  181. end
  182. local shirt=Instance.new("Shirt",char)
  183. shirt.ShirtTemplate="rbxassetid://224759652"
  184. local pants=Instance.new("Pants",char)
  185. pants.PantsTemplate="rbxassetid://223117189"
  186. do -- character
  187. for i = 1, 6 do
  188. local cm=Instance.new("CharacterMesh")
  189. cm.BodyPart=i
  190. print(cm.BodyPart)
  191. cm.Parent=char
  192. if cm.BodyPart==Enum.BodyPart.Torso then
  193. cm.MeshId="27111894"
  194. elseif cm.BodyPart==Enum.BodyPart.LeftArm then
  195. cm.MeshId="27111419"
  196. elseif cm.BodyPart==Enum.BodyPart.RightArm then
  197. cm.MeshId="27111864"
  198. elseif cm.BodyPart==Enum.BodyPart.LeftLeg then
  199. cm.MeshId="27111857"
  200. elseif cm.BodyPart==Enum.BodyPart.RightLeg then
  201. cm.MeshId="27111882"
  202. end
  203. end
  204. end
  205. end)
  206.  
  207. function stringToTable(str)
  208. local list = {}
  209. for i in string.gmatch(str, "%S+") do
  210. table.insert(list, i)
  211. end
  212. return list
  213. end
  214.  
  215. player.Chatted:connect(function (msg)
  216. if msg:sub(1,1)=="!" then
  217. local cmdname=msg:sub(2)
  218. local args=stringToTable(cmdname)
  219. cmdname=args[1]
  220. local command=commands[cmdname]
  221. if not command then Error("No command by the name '" .. cmdname .. "' exists") return end
  222. command(args)
  223. elseif msg:sub(1,1)=="/" then
  224. if msg:sub(3,3)=="!" then
  225. msg=msg:sub(3)
  226. local cmdname=msg:sub(2)
  227. local args=stringToTable(cmdname)
  228. cmdname=args[1]
  229. local command=commands[cmdname]
  230. if not command then Error("No command by the name '" .. cmdname .. "' exists") return end
  231. command(args)
  232. end
  233. end
  234. end)
  235. print "!kill [p] | Kills [p] !respawn [p] | Respawns [p] !kick [p] | Kicks [p] !sparkles [p] | Gives [p] Sparkles !fire [p] | Gives [p] a Fire effect !smoke [p] | Gives [p] a Smoke effect !tp [t] [p] | Teleports [t] to [p] !stealhats [p] | Steals hats from [p] !bon [p] | Turns [p] into Bon."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement