GodModeOnLemme

Untitled

Jun 16th, 2024
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.24 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local player = Players.LocalPlayer
  3. local character = player.Character or player.CharacterAdded:Wait()
  4.  
  5. -- Function to setup the GUI
  6. local function setupGui()
  7.  
  8. for _, obj in ipairs(player.PlayerGui:GetChildren()) do
  9. if obj:IsA("ScreenGui") and obj.Name == "CustomGui" then
  10. obj:Destroy()
  11. end
  12. end
  13.  
  14. local mouse = player:GetMouse()
  15. local humanoid = character:WaitForChild("Humanoid")
  16.  
  17. -- GUI Elements
  18. local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  19. local mainFrame = Instance.new("Frame", screenGui)
  20. local button = Instance.new("TextButton", screenGui)
  21. local speedLabel = Instance.new("TextLabel", mainFrame)
  22. local speedInput = Instance.new("TextBox", mainFrame)
  23. local jumpLabel = Instance.new("TextLabel", mainFrame)
  24. local jumpInput = Instance.new("TextBox", mainFrame)
  25. local setButton = Instance.new("TextButton", mainFrame)
  26. local resetSpeedButton = Instance.new("TextButton", mainFrame)
  27. local resetJumpButton = Instance.new("TextButton", mainFrame)
  28. local closeButton = Instance.new("TextButton", mainFrame)
  29. local settingsButton = Instance.new("TextButton", mainFrame)
  30. local languageFrame = Instance.new("Frame", mainFrame)
  31. local englishButton = Instance.new("TextButton", languageFrame)
  32. local turkishButton = Instance.new("TextButton", languageFrame)
  33.  
  34. -- Initial properties
  35. screenGui.Name = "CustomGui"
  36. screenGui.ResetOnSpawn = false
  37.  
  38. mainFrame.Name = "MainFrame"
  39. mainFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  40. mainFrame.BorderSizePixel = 0
  41. mainFrame.Position = UDim2.new(0.3, 0, 0.3, 0)
  42. mainFrame.Size = UDim2.new(0, 300, 0, 300)
  43. mainFrame.Visible = false
  44. mainFrame.Draggable = true
  45. mainFrame.Active = true
  46.  
  47. button.Name = "OpenButton"
  48. button.Text = "Open Menu"
  49. button.Position = UDim2.new(0.4, 0, 0.4, 0)
  50. button.Size = UDim2.new(0, 150, 0, 50)
  51. button.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
  52. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. button.Font = Enum.Font.SourceSansBold
  54. button.TextSize = 24
  55. button.Active = true
  56. button.Draggable = true
  57. button.MouseButton1Click:Connect(function()
  58. mainFrame.Visible = not mainFrame.Visible
  59. if mainFrame.Visible then
  60. mainFrame:TweenPosition(UDim2.new(0.3, 0, 0.3, 0), "Out", "Bounce", 0.5, true)
  61. else
  62. mainFrame:TweenPosition(UDim2.new(1, 0, 0.3, 0), "Out", "Bounce", 0.5, true)
  63. end
  64. end)
  65.  
  66. speedLabel.Name = "SpeedLabel"
  67. speedLabel.Text = "Speed"
  68. speedLabel.Position = UDim2.new(0.1, 0, 0.1, 0)
  69. speedLabel.Size = UDim2.new(0, 100, 0, 25)
  70. speedLabel.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
  71. speedLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  72. speedLabel.Font = Enum.Font.SourceSansBold
  73. speedLabel.TextSize = 18
  74.  
  75. speedInput.Name = "SpeedInput"
  76. speedInput.PlaceholderText = "Enter Speed"
  77. speedInput.Position = UDim2.new(0.5, 0, 0.1, 0)
  78. speedInput.Size = UDim2.new(0, 100, 0, 25)
  79. speedInput.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  80. speedInput.TextColor3 = Color3.fromRGB(0, 0, 0)
  81. speedInput.Font = Enum.Font.SourceSans
  82. speedInput.TextSize = 18
  83.  
  84. jumpLabel.Name = "JumpLabel"
  85. jumpLabel.Text = "Jump Power"
  86. jumpLabel.Position = UDim2.new(0.1, 0, 0.3, 0)
  87. jumpLabel.Size = UDim2.new(0, 100, 0, 25)
  88. jumpLabel.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
  89. jumpLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  90. jumpLabel.Font = Enum.Font.SourceSansBold
  91. jumpLabel.TextSize = 18
  92.  
  93. jumpInput.Name = "JumpInput"
  94. jumpInput.PlaceholderText = "Enter Jump Power"
  95. jumpInput.Position = UDim2.new(0.5, 0, 0.3, 0)
  96. jumpInput.Size = UDim2.new(0, 100, 0, 25)
  97. jumpInput.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  98. jumpInput.TextColor3 = Color3.fromRGB(0, 0, 0)
  99. jumpInput.Font = Enum.Font.SourceSans
  100. jumpInput.TextSize = 18
  101.  
  102. setButton.Name = "SetButton"
  103. setButton.Text = "SET"
  104. setButton.Position = UDim2.new(0.1, 0, 0.5, 0)
  105. setButton.Size = UDim2.new(0, 100, 0, 25)
  106. setButton.BackgroundColor3 = Color3.fromRGB(60, 179, 113)
  107. setButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  108. setButton.Font = Enum.Font.SourceSansBold
  109. setButton.TextSize = 18
  110. setButton.MouseButton1Click:Connect(function()
  111. local speed = tonumber(speedInput.Text)
  112. local jumpPower = tonumber(jumpInput.Text)
  113. if speed then
  114. humanoid.WalkSpeed = speed
  115. end
  116. if jumpPower then
  117. humanoid.JumpPower = jumpPower
  118. end
  119. end)
  120.  
  121. resetSpeedButton.Name = "ResetSpeedButton"
  122. resetSpeedButton.Text = "Reset Speed"
  123. resetSpeedButton.Position = UDim2.new(0.5, 0, 0.5, 0)
  124. resetSpeedButton.Size = UDim2.new(0, 100, 0, 25)
  125. resetSpeedButton.BackgroundColor3 = Color3.fromRGB(255, 69, 0)
  126. resetSpeedButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  127. resetSpeedButton.Font = Enum.Font.SourceSansBold
  128. resetSpeedButton.TextSize = 18
  129. resetSpeedButton.MouseButton1Click:Connect(function()
  130. humanoid.WalkSpeed = 16
  131. end)
  132.  
  133. resetJumpButton.Name = "ResetJumpButton"
  134. resetJumpButton.Text = "Reset Jump"
  135. resetJumpButton.Position = UDim2.new(0.1, 0, 0.7, 0)
  136. resetJumpButton.Size = UDim2.new(0, 100, 0, 25)
  137. resetJumpButton.BackgroundColor3 = Color3.fromRGB(255, 69, 0)
  138. resetJumpButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  139. resetJumpButton.Font = Enum.Font.SourceSansBold
  140. resetJumpButton.TextSize = 18
  141. resetJumpButton.MouseButton1Click:Connect(function()
  142. humanoid.JumpPower = 50
  143. end)
  144.  
  145. settingsButton.Name = "SettingsButton"
  146. settingsButton.Text = "Settings"
  147. settingsButton.Position = UDim2.new(0.5, 0, 0.7, 0)
  148. settingsButton.Size = UDim2.new(0, 100, 0, 25)
  149. settingsButton.BackgroundColor3 = Color3.fromRGB(135, 206, 250)
  150. settingsButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  151. settingsButton.Font = Enum.Font.SourceSansBold
  152. settingsButton.TextSize = 18
  153. settingsButton.MouseButton1Click:Connect(function()
  154. languageFrame.Visible = not languageFrame.Visible
  155. end)
  156.  
  157. languageFrame.Name = "LanguageFrame"
  158. languageFrame.BackgroundColor3 = Color3.fromRGB(200, 200, 200)
  159. languageFrame.BorderSizePixel = 0
  160. languageFrame.Position = UDim2.new(0.6, 0, 0.9, 0)
  161. languageFrame.Size = UDim2.new(0, 120, 0, 50)
  162. languageFrame.Visible = false
  163.  
  164. englishButton.Name = "EnglishButton"
  165. englishButton.Text = "English"
  166. englishButton.Position = UDim2.new(0.1, 0, 0.1, 0)
  167. englishButton.Size = UDim2.new(0, 100, 0, 25)
  168. englishButton.BackgroundColor3 = Color3.fromRGB(135, 206, 250)
  169. englishButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  170. englishButton.Font = Enum.Font.SourceSansBold
  171. englishButton.TextSize = 18
  172. englishButton.MouseButton1Click:Connect(function()
  173. speedLabel.Text = "Speed"
  174. speedInput.PlaceholderText = "Enter Speed"
  175. jumpLabel.Text = "Jump Power"
  176. jumpInput.PlaceholderText = "Enter Jump Power"
  177. setButton.Text = "SET"
  178. resetSpeedButton.Text = "Reset Speed"
  179. resetJumpButton.Text = "Reset Jump"
  180. settingsButton.Text = "Settings"
  181. end)
  182.  
  183. turkishButton.Name = "TurkishButton"
  184. turkishButton.Text = "Turkish"
  185. turkishButton.Position = UDim2.new(0.1, 0, 0.6, 0)
  186. turkishButton.Size = UDim2.new(0, 100, 0, 25)
  187. turkishButton.BackgroundColor3 = Color3.fromRGB(135, 206, 250)
  188. turkishButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  189. turkishButton.Font = Enum.Font.SourceSansBold
  190. turkishButton.TextSize = 18
  191. turkishButton.MouseButton1Click:Connect(function()
  192. speedLabel.Text = "Hız"
  193. speedInput.PlaceholderText = "Hız Girin"
  194. jumpLabel.Text = "Zıplama Gücü"
  195. jumpInput.PlaceholderText = "Zıplama Gücü Girin"
  196. setButton.Text = "AYARLA"
  197. resetSpeedButton.Text = "Hızı Sıfırla"
  198. resetJumpButton.Text = "Zıplamayı Sıfırla"
  199. settingsButton.Text = "Ayarlar"
  200. end)
  201.  
  202. closeButton.Name = "CloseButton"
  203. closeButton.Text = "X"
  204. closeButton.Position = UDim2.new(0.9, 0, 0, 0)
  205. closeButton.Size = UDim2.new(0, 25, 0, 25)
  206. closeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  207. closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  208. closeButton.Font = Enum.Font.SourceSansBold
  209. closeButton.TextSize = 18
  210. closeButton.MouseButton1Click:Connect(function()
  211. mainFrame.Visible = false
  212. end)
  213.  
  214. -- Animation
  215. button.MouseEnter:Connect(function()
  216. button:TweenSize(UDim2.new(0, 200, 0, 70), "Out", "Bounce", 0.5, true)
  217. end)
  218. button.MouseLeave:Connect(function()
  219. button:TweenSize(UDim2.new(0, 150, 0, 50), "Out", "Bounce", 0.5, true)
  220. end)
  221.  
  222. -- Make the main frame draggable
  223. local UIS = game:GetService("UserInputService")
  224. local dragToggle = nil
  225. local dragSpeed = 0.25
  226. local dragStart = nil
  227. local startPos = nil
  228.  
  229. local function updateInput(input)
  230. local delta = input.Position - dragStart
  231. mainFrame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  232. end
  233.  
  234. mainFrame.InputBegan:Connect(function(input)
  235. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  236. dragToggle = true
  237. dragStart = input.Position
  238. startPos = mainFrame.Position
  239. input.Changed:Connect(function()
  240. if input.UserInputState == Enum.UserInputState.End then
  241. dragToggle = false
  242. end
  243. end)
  244. end
  245. end)
  246.  
  247. mainFrame.InputChanged:Connect(function(input)
  248. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  249. if dragToggle then
  250. updateInput(input)
  251. end
  252. end
  253. end)
  254.  
  255. -- Dragging for the button
  256. button.InputBegan:Connect(function(input)
  257. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  258. dragToggle = true
  259. dragStart = input.Position
  260. startPos = button.Position
  261. input.Changed:Connect(function()
  262. if input.UserInputState == Enum.UserInputState.End then
  263. dragToggle = false
  264. end
  265. end)
  266. end
  267. end)
  268.  
  269. button.InputChanged:Connect(function(input)
  270. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  271. if dragToggle then
  272. local delta = input.Position - dragStart
  273. button.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  274. end
  275. end
  276. end)
  277. end
  278.  
  279. -- Function to reset the GUI setup on respawn
  280. local function onCharacterAdded(char)
  281. character = char
  282. setupGui()
  283. end
  284.  
  285. player.CharacterAdded:Connect(onCharacterAdded)
  286.  
  287. -- Initial setup
  288. setupGui()
  289.  
Advertisement
Add Comment
Please, Sign In to add comment