Homestyle_chicken

pl gunspawn

Apr 23rd, 2020
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.13 KB | None | 0 0
  1. local A1={"M9"}
  2. local A2={"M4A1"}
  3. local A3={"Remington 870"}
  4. local A4={"AK-47"}
  5.  
  6. local slot1 = A1
  7. local slot2 = A2
  8. local slot3 = A3
  9. local slot4 = A4
  10. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot1[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  11. wait(0.1)
  12. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot2[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  13. wait(0.1)
  14. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot3[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  15. wait(0.1)
  16. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot4[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  17. wait(0.1)
  18.  
  19. local lp = game:GetService("Players").LocalPlayer
  20. local gun = lp.Backpack:FindFirstChild("M9")
  21. local sM = require(gun:FindFirstChild("GunStates"))
  22. sM["MaxAmmo"] = math.huge
  23. sM["StoredAmmo"] = math.huge
  24. sM["CurrentAmmo"] = math.huge
  25.  
  26. local lp = game:GetService("Players").LocalPlayer
  27. local gun = lp.Backpack:FindFirstChild("M4A1")
  28. local sM = require(gun:FindFirstChild("GunStates"))
  29. sM["MaxAmmo"] = math.huge
  30. sM["StoredAmmo"] = math.huge
  31. sM["CurrentAmmo"] = math.huge
  32.  
  33. local lp = game:GetService("Players").LocalPlayer
  34. local gun = lp.Backpack:FindFirstChild("AK-47")
  35. local sM = require(gun:FindFirstChild("GunStates"))
  36. sM["MaxAmmo"] = math.huge
  37. sM["StoredAmmo"] = math.huge
  38. sM["CurrentAmmo"] = math.huge
  39.  
  40. local lp = game:GetService("Players").LocalPlayer
  41. local gun = lp.Backpack:FindFirstChild("Remington 870")
  42. local sM = require(gun:FindFirstChild("GunStates"))
  43. sM["MaxAmmo"] = math.huge
  44. sM["StoredAmmo"] = math.huge
  45. sM["CurrentAmmo"] = math.huge
  46.  
  47. game.Players.LocalPlayer.CharacterAdded:Connect(function(Character)
  48. wait(0.01)
  49. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot1[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  50. wait(0.1)
  51. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot2[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  52. wait(0.1)
  53. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot3[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  54. wait(0.1)
  55. for Y,Z in pairs(workspace.Prison_ITEMS.giver:GetChildren())do if Z.Name==slot4[1]then local lol=workspace.Remote.ItemHandler:InvokeServer(Z.ITEMPICKUP)end end
  56. wait(0.1)
  57.  
  58. local lp = game:GetService("Players").LocalPlayer
  59. local gun = lp.Backpack:FindFirstChild("M9")
  60. local sM = require(gun:FindFirstChild("GunStates"))
  61. sM["MaxAmmo"] = math.huge
  62. sM["StoredAmmo"] = math.huge
  63. sM["CurrentAmmo"] = math.huge
  64.  
  65. local lp = game:GetService("Players").LocalPlayer
  66. local gun = lp.Backpack:FindFirstChild("M4A1")
  67. local sM = require(gun:FindFirstChild("GunStates"))
  68. sM["MaxAmmo"] = math.huge
  69. sM["StoredAmmo"] = math.huge
  70. sM["CurrentAmmo"] = math.huge
  71.  
  72. local lp = game:GetService("Players").LocalPlayer
  73. local gun = lp.Backpack:FindFirstChild("AK-47")
  74. local sM = require(gun:FindFirstChild("GunStates"))
  75. sM["MaxAmmo"] = math.huge
  76. sM["StoredAmmo"] = math.huge
  77. sM["CurrentAmmo"] = math.huge
  78.  
  79. local lp = game:GetService("Players").LocalPlayer
  80. local gun = lp.Backpack:FindFirstChild("Remington 870")
  81. local sM = require(gun:FindFirstChild("GunStates"))
  82. sM["MaxAmmo"] = math.huge
  83. sM["StoredAmmo"] = math.huge
  84. sM["CurrentAmmo"] = math.huge
  85. end)
  86. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
  87. Text = "Gunspawn +auto respawn loaded succesfully, enjoy! made by Virtual Void#0001",
  88. Color = Color3.new(0,0,0),
  89. FontSize = Enum.FontSize.Size24,
  90. })
  91.  
  92.  
  93. -- Gui to Lua
  94. -- Version: 3.2
  95.  
  96. -- Instances:
  97.  
  98. local ScreenGui = Instance.new("ScreenGui")
  99. local Frame = Instance.new("Frame")
  100. local on = Instance.new("TextButton")
  101. local off = Instance.new("TextButton")
  102.  
  103. --Properties:
  104.  
  105. ScreenGui.Parent = game.CoreGui
  106.  
  107. Frame.Parent = ScreenGui
  108. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  109. Frame.Position = UDim2.new(0.0543615669, 0, 0.879947186, 0)
  110. Frame.Size = UDim2.new(0, 105, 0, 31)
  111.  
  112. on.Name = "on"
  113. on.Parent = Frame
  114. on.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  115. on.Size = UDim2.new(0, 105, 0, 31)
  116. on.Font = Enum.Font.SourceSans
  117. on.Text = "auto respawn on"
  118. on.TextColor3 = Color3.fromRGB(0, 0, 0)
  119. on.TextSize = 14.000
  120. on.Visible = false
  121. on.MouseButton1Down:Connect(function()
  122. on.Visible = false
  123. off.Visible = true
  124.  
  125. local blah = (game.Players.LocalPlayer.Name)
  126.  
  127. _G.Looop = false
  128.  
  129. while _G.Looop == true do wait(0.1)
  130. if game:GetService("Workspace")[blah].Humanoid.Health == 0 then
  131. saved = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  132. game:GetService("StarterGui"):SetCore("SendNotification", {
  133. Title = "Position Saved";
  134. Text = "Success";
  135. })
  136. local A_1 = "LocalPlayer"
  137.  
  138. local Event = game:GetService("Workspace").Remote.loadchar
  139. Event:InvokeServer(A_1)
  140.  
  141. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = saved
  142. game:GetService("StarterGui"):SetCore("SendNotification", {
  143. Title = "Position Loaded";
  144. Text = "Success";
  145. })
  146. end
  147. end
  148. end)
  149.  
  150. off.Name = "off"
  151. off.Parent = Frame
  152. off.BackgroundColor3 = Color3.fromRGB(255, 0, 4)
  153. off.Size = UDim2.new(0, 105, 0, 31)
  154. off.Font = Enum.Font.SourceSans
  155. off.Text = "auto respawn off"
  156. off.TextColor3 = Color3.fromRGB(0, 0, 0)
  157. off.TextSize = 14.000
  158. off.Visible = true
  159. off.MouseButton1Down:Connect(function()
  160. off.Visible = false
  161. on.Visible = true
  162.  
  163. local blah = (game.Players.LocalPlayer.Name)
  164.  
  165. _G.Looop = true
  166.  
  167. while _G.Looop == true do wait(0.1)
  168. if game:GetService("Workspace")[blah].Humanoid.Health == 0 then
  169. saved = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  170. game:GetService("StarterGui"):SetCore("SendNotification", {
  171. Title = "Position Saved";
  172. Text = "Success";
  173. })
  174. local A_1 = "LocalPlayer"
  175.  
  176. local Event = game:GetService("Workspace").Remote.loadchar
  177. Event:InvokeServer(A_1)
  178.  
  179. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = saved
  180. game:GetService("StarterGui"):SetCore("SendNotification", {
  181. Title = "Position Loaded";
  182. Text = "Success";
  183. })
  184. end
  185. end
  186. end)
Add Comment
Please, Sign In to add comment