Advertisement
asifo

Sword simulator OP Gui

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