Advertisement
Adel987654321

Sword Simulator

Dec 5th, 2019
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. if game:GetService("CoreGui"):FindFirstChild("Dankity") then
  2. game:GetService("CoreGui").Dankity:Destroy()
  3. end
  4.  
  5.  
  6. --//-- VARIABLES --\\--
  7.  
  8. Dankity = Instance.new("ScreenGui", game:GetService("Players").LocalPlayer.PlayerGui)
  9. Main = Instance.new("Frame", Dankity)
  10. Header = Instance.new("Frame", Main)
  11. Text = Instance.new("TextLabel", Header)
  12. Username = Instance.new("TextBox", Main)
  13. Kill = Instance.new("TextButton", Main)
  14. Power = Instance.new("TextButton", Main)
  15. LocalPlayer = game:GetService("Players").LocalPlayer
  16. Backpack = LocalPlayer.Backpack
  17. Character = LocalPlayer.Character
  18. Humanoid = Character.Humanoid
  19.  
  20. --//-- PROPERTIES --\\--
  21.  
  22. Dankity.Name = "Dankity"
  23. Dankity.ResetOnSpawn = false
  24.  
  25. Main.Name = "Main"
  26. Main.BackgroundColor3 = Color3.new(0.384314, 0.384314, 0.384314)
  27. Main.BorderSizePixel = 0
  28. Main.Active = true
  29. Main.Draggable = true
  30. Main.Selectable = true
  31. Main.Position = UDim2.new(0.321995467, 0, 0.22910662, 0)
  32. Main.Size = UDim2.new(0, 471, 0, 375)
  33.  
  34. Header.Name = "Header"
  35. Header.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  36. Header.BorderSizePixel = 0
  37. Header.Position = UDim2.new(0, 0, 0.0613333359, 0)
  38. Header.Size = UDim2.new(0, 471, 0, 64)
  39.  
  40. Text.Name = "Text"
  41. Text.BackgroundColor3 = Color3.new(1, 1, 1)
  42. Text.BackgroundTransparency = 1
  43. Text.Position = UDim2.new(0.165605083, 0, 0.102874994, 0)
  44. Text.Size = UDim2.new(0, 315, 0, 50)
  45. Text.Font = Enum.Font.SourceSansBold
  46. Text.Text = "Sword Simulator Destroyer"
  47. Text.TextColor3 = Color3.new(1, 1, 1)
  48. Text.TextSize = 30
  49.  
  50. Username.Name = "Username"
  51. Username.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  52. Username.BorderSizePixel = 0
  53. Username.Position = UDim2.new(0.17622079, 0, 0.346666723, 0)
  54. Username.Size = UDim2.new(0, 305, 0, 50)
  55. Username.Font = Enum.Font.SourceSansSemibold
  56. Username.Text = "Username"
  57. Username.TextColor3 = Color3.new(1, 1, 1)
  58. Username.TextSize = 20
  59.  
  60. Kill.Name = "Kill"
  61. Kill.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  62. Kill.BorderSizePixel = 0
  63. Kill.Position = UDim2.new(0.282377899, 0, 0.519999981, 0)
  64. Kill.Size = UDim2.new(0, 200, 0, 50)
  65. Kill.Font = Enum.Font.SourceSansSemibold
  66. Kill.Text = "Kill"
  67. Kill.TextColor3 = Color3.new(1, 1, 1)
  68. Kill.TextSize = 20
  69. Kill.TextWrapped = true
  70.  
  71. Power.Name = "Power"
  72. Power.BackgroundColor3 = Color3.new(0.560784, 0.560784, 0.560784)
  73. Power.BorderSizePixel = 0
  74. Power.Position = UDim2.new(0.282377899, 0, 0.685333312, 0)
  75. Power.Size = UDim2.new(0, 200, 0, 50)
  76. Power.Font = Enum.Font.SourceSansSemibold
  77. Power.Text = "Power-Farming"
  78. Power.TextColor3 = Color3.new(1, 1, 1)
  79. Power.TextSize = 20
  80. Power.TextWrapped = true
  81.  
  82. --//-- FUNCTIONS --\\--
  83.  
  84. function GetPlayers(Name)
  85. if Name:lower() == "me" then
  86. return {Player}
  87. elseif Name:lower() == "all" then
  88. return game:GetService("Players"):GetPlayers()
  89. elseif Name:lower() == "others" then
  90. local t = {}
  91. for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  92. if v.Name ~= Player.Name then
  93. t[#t+1] = v
  94. end
  95. end
  96. return t
  97. else
  98. local t = {}
  99. for i, v in pairs(game:GetService("Players"):GetPlayers()) do
  100. if v.Name:sub(1, #Name):lower() == Name:lower() then
  101. t[#t+1] = v
  102. end
  103. end
  104. return t
  105. end
  106. end
  107.  
  108. --//-- SCRIPTING --\\--
  109.  
  110. Kill.MouseButton1Click:Connect(function()
  111. for _,v in pairs(Backpack:GetChildren()) do
  112. Humanoid:EquipTool(v)
  113. end
  114.  
  115. local Plrs = GetPlayers(Username.Text)
  116. for i,v in pairs(Plrs) do
  117. for i = 1 , 10 do
  118.  
  119. if Character:FindFirstChild("sword") then
  120.  
  121. Character.sword.Handle.dmg.RemoteEvent:FireServer(game:GetService("Workspace")[v.Name].Humanoid, 9999)
  122. end
  123. end
  124. end
  125. end)
  126.  
  127. Power.MouseButton1Click:Connect(function()
  128. for _,v in pairs(Backpack:GetChildren()) do
  129. Humanoid:EquipTool(v)
  130. end
  131.  
  132. if Character:FindFirstChild("sword") then
  133.  
  134. while wait() do
  135. Character.sword.Handle.up.RemoteEvent:FireServer()
  136. if not Character:FindFirstChild("sword") then
  137. for _,v in pairs(Backpack:GetChildren()) do
  138. Humanoid:EquipTool(v)
  139. end
  140. end
  141. end
  142. end
  143. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement