Advertisement
snowyblizzard12

Untitled

Feb 19th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. local lplr = game:GetService("Players").LocalPlayer
  2. local tpKey = "e" --Has to be a letter
  3. local walkspeed = 100
  4. local jumpHight = 5
  5. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  6.  
  7. local screen = Instance.new("ScreenGui")
  8. screen.Name = "Mad Paintball 2 Gui"
  9. screen.Parent = game:GetService("CoreGui")
  10. local mainFrame = Instance.new("Frame")
  11. mainFrame.Parent = screen
  12. mainFrame.Name = "MainFrame"
  13. mainFrame.Active = true
  14. mainFrame.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  15. mainFrame.BorderSizePixel = 0
  16. mainFrame.Position = UDim2.new(0, 10, 0, 10)
  17. mainFrame.Size = UDim2.new(0, 200, 0, 130)
  18. mainFrame.Draggable = true
  19.  
  20. local function makeButton(name, position, size, text, func)
  21. local button = Instance.new("TextButton")
  22. button.Parent = mainFrame
  23. button.Name = name
  24. button.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  25. button.BorderSizePixel = 0
  26. button.Position = position
  27. button.Size = size
  28. button.Font = "Arial"
  29. button.Text = text
  30. button.TextSize = 14
  31. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  32. button.MouseButton1Down:connect(func)
  33. end
  34.  
  35. local function makeBox(name, position, text)
  36. local box = Instance.new("TextBox")
  37. box.Parent = mainFrame
  38. box.Name = name
  39. box.BackgroundColor3 = Color3.fromRGB(75, 75, 75)
  40. box.BorderSizePixel = 0
  41. box.Position = position
  42. box.Size = UDim2.new(0, 45, 0, 20)
  43. box.Font = "Arial"
  44. box.Text = text
  45. box.TextColor3 = Color3.fromRGB(255, 255, 255)
  46. box.TextSize = 14
  47. end
  48.  
  49. local function makeLabel(name, color, position, size, font, text, textSize)
  50. local label = Instance.new("TextLabel")
  51. label.Parent = mainFrame
  52. label.Name = name
  53. label.BackgroundColor3 = color
  54. label.BorderSizePixel = 0
  55. label.Position = position
  56. label.Size = size
  57. label.Font = font
  58. label.Text = text
  59. label.TextSize = textSize
  60. label.TextColor3 = Color3.fromRGB(255, 255, 255)
  61. end
  62.  
  63. makeLabel("Title", Color3.fromRGB(25, 25, 25), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 0, 30), "ArialBold", "Mad Paintball 2", 20)
  64. makeLabel("WalkspeedLabel", Color3.fromRGB(50, 50, 50), UDim2.new(0, 4, 0, 34), UDim2.new(0, 94, 0, 20), "Arial", "Walkspeed", 14)
  65. makeBox("WalkspeedBox", UDim2.new(0, 102, 0, 34), tostring(walkspeed))
  66. makeButton("WalkspeedButton", UDim2.new(0, 151, 0, 34), UDim2.new(0, 45, 0, 20), "Set", function()
  67. local humanoid = lplr.Character.Humanoid
  68. humanoid.WalkSpeed = tonumber(mainFrame.WalkspeedBox.Text)
  69. end)
  70. makeLabel("JumpPowerLabel", Color3.fromRGB(50, 50, 50), UDim2.new(0, 4, 0, 58), UDim2.new(0, 94, 0, 20), "Arial", "JumpPower", 14)
  71. makeBox("JumpPowerBox", UDim2.new(0, 102, 0, 58), tostring(jumpHight))
  72. makeButton("JumpPowerButton", UDim2.new(0, 151, 0, 58), UDim2.new(0, 45, 0, 20), "Set", function()
  73. local humanoid = lplr.Character.Humanoid
  74. humanoid.JumpPower = tonumber(mainFrame.JumpPowerBox.Text)
  75. end)
  76. makeButton("GodmodeButton", UDim2.new(0, 4, 0, 82), UDim2.new(0, 94, 0, 20), "Godmode", function()
  77. if lplr.Character.Humanoid then
  78. lplr.Character.Humanoid.Name = lplr.Name
  79. local clone = lplr.Character[lplr.Name]:Clone()
  80. clone.Parent = lplr.Character
  81. clone.Name = "Humanoid"
  82. wait(0.5)
  83. lplr.Character[lplr.Name]:Destroy()
  84. workspace.CurrentCamera.CameraSubject = lplr.Character.Humanoid
  85. end
  86. end)
  87. makeButton("RubiesButton", UDim2.new(0, 102, 0, 82), UDim2.new(0, 94, 0, 20), "Rubies", function()
  88. game.ReplicatedStorage.GameMain.Select:FireServer("BuySlot", {"2Slots1Day", -2e99})
  89. end)
  90. makeLabel("PressToTp", Color3.fromRGB(50, 50, 50), UDim2.new(0, 4, 0, 106), UDim2.new(0, 192, 0, 20), "Arial", "Press ["..string.upper(tpKey).."] to Tp", 14)
  91.  
  92. function onKeyPress(inputObject, gameProcessedEvent)
  93. local rootPart = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart
  94. if inputObject.KeyCode == Enum.KeyCode.Space then
  95. if rootPart then
  96. rootPart.CFrame = rootPart.CFrame + Vector3.new(0, tonumber(mainFrame.JumpPowerBox.Text), 0)
  97. end
  98. elseif inputObject.KeyCode == Enum.KeyCode[string.upper(tpKey)] then
  99. rootPart.CFrame = mouse.Hit + Vector3.new(0, 5, 0)
  100. end
  101. end
  102.  
  103. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  104.  
  105. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement