Smartdumgood

Retrt

Dec 9th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local StarterGui = game:GetService("StarterGui")
  3. local TweenService = game:GetService("TweenService")
  4. local RunService = game:GetService("RunService")
  5.  
  6. -- GUI Setup
  7. local screenGui = Instance.new("ScreenGui")
  8. screenGui.Name = "CharacterSelectorGui"
  9. screenGui.ResetOnSpawn = false
  10.  
  11. local frame = Instance.new("Frame")
  12. frame.Size = UDim2.new(0, 200, 0, 150)
  13. frame.Position = UDim2.new(0.85, 0, 0.5, -75)
  14. frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  15. frame.Parent = screenGui
  16.  
  17. -- Button creation function
  18. local function createButton(name, position)
  19. local button = Instance.new("TextButton")
  20. button.Size = UDim2.new(0.9, 0, 0.25, 0)
  21. button.Position = position
  22. button.Text = name
  23. button.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  24. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  25. button.Parent = frame
  26. return button
  27. end
  28.  
  29. -- Character Functions
  30. local function setupLaserEye()
  31. local player = Players.LocalPlayer
  32. local character = player.Character
  33. if not character then return end
  34.  
  35. local humanoid = character:WaitForChild("Humanoid")
  36. humanoid.WalkSpeed = 16
  37.  
  38. local eye = Instance.new("Part")
  39. eye.Shape = Enum.PartType.Ball
  40. eye.Size = Vector3.new(2, 2, 2)
  41. eye.CanCollide = false
  42. eye.Anchored = true
  43. eye.Parent = character
  44.  
  45. local decal = Instance.new("Decal")
  46. decal.Texture = "rbxassetid://6755657145"
  47. decal.Face = Enum.NormalId.Front
  48. decal.Parent = eye
  49.  
  50. local function updateEyePosition()
  51. local basePos = character.HumanoidRootPart.Position + Vector3.new(0, 5, 0)
  52. local time = tick()
  53. eye.Position = basePos + Vector3.new(0, math.sin(time) * 0.5, 0)
  54. end
  55.  
  56. local function shootBeam(targetPos)
  57. local beam = Instance.new("Part")
  58. beam.Size = Vector3.new(0.2, 0.2, 10)
  59. beam.CanCollide = false
  60. beam.Anchored = true
  61. beam.Position = eye.Position
  62. beam.CFrame = CFrame.lookAt(eye.Position, targetPos)
  63.  
  64. local colors = {
  65. Color3.fromRGB(0, 255, 255), -- cyan
  66. Color3.fromRGB(255, 0, 0), -- red
  67. Color3.fromRGB(255, 165, 0), -- orange
  68. Color3.fromRGB(0, 255, 0), -- green
  69. Color3.fromRGB(255, 255, 0), -- yellow
  70. Color3.fromRGB(0, 255, 0) -- lime
  71. }
  72. beam.Color = colors[math.random(1, #colors)]
  73. beam.Parent = workspace
  74.  
  75. game:GetService("Debris"):AddItem(beam, 3)
  76. TweenService:Create(beam, TweenInfo.new(3), {Transparency = 1}):Play()
  77. end
  78.  
  79. local mouse = player:GetMouse()
  80. local mouseConnection = mouse.Button1Down:Connect(function()
  81. shootBeam(mouse.Hit.Position)
  82. end)
  83.  
  84. local updateConnection = RunService.Heartbeat:Connect(updateEyePosition)
  85.  
  86. return function()
  87. mouseConnection:Disconnect()
  88. updateConnection:Disconnect()
  89. eye:Destroy()
  90. end
  91. end
  92.  
  93. local function setupFlash()
  94. local player = Players.LocalPlayer
  95. local character = player.Character
  96. if not character then return end
  97.  
  98. local humanoid = character:WaitForChild("Humanoid")
  99.  
  100. local shirt = Instance.new("Shirt")
  101. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=2697520779"
  102. shirt.Parent = character
  103.  
  104. local pants = Instance.new("Pants")
  105. pants.PantsTemplate = "http://www.roblox.com/asset/?id=2697522843"
  106. pants.Parent = character
  107.  
  108. local currentSpeed = 16
  109. local maxSpeed = 100
  110. local connection = RunService.Heartbeat:Connect(function(delta)
  111. if humanoid.MoveDirection.Magnitude > 0 then
  112. currentSpeed = math.min(currentSpeed + (delta * 40), maxSpeed)
  113. humanoid.WalkSpeed = currentSpeed
  114. workspace.CurrentCamera.FieldOfView = 70 + (currentSpeed - 16) * 0.3
  115. else
  116. currentSpeed = 16
  117. humanoid.WalkSpeed = currentSpeed
  118. workspace.CurrentCamera.FieldOfView = 70
  119. end
  120. end)
  121.  
  122. return function()
  123. connection:Disconnect()
  124. workspace.CurrentCamera.FieldOfView = 70
  125. if shirt then shirt:Destroy() end
  126. if pants then pants:Destroy() end
  127. end
  128. end
  129.  
  130. local function setupMario()
  131. local player = Players.LocalPlayer
  132. local character = player.Character
  133. if not character then return end
  134.  
  135. local humanoid = character:WaitForChild("Humanoid")
  136. local rootPart = character:WaitForChild("HumanoidRootPart")
  137. local jumpCount = 0
  138. local isGroundPounding = false
  139.  
  140. local shirt = Instance.new("Shirt")
  141. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=9619000970"
  142. shirt.Parent = character
  143.  
  144. local pants = Instance.new("Pants")
  145. pants.PantsTemplate = "http://www.roblox.com/asset/?id=9619006570"
  146. pants.Parent = character
  147.  
  148. local function onJump()
  149. if isGroundPounding then return end
  150.  
  151. jumpCount = jumpCount + 1
  152. if jumpCount <= 3 then
  153. if jumpCount == 1 then
  154. humanoid.JumpPower = 50
  155. elseif jumpCount == 2 then
  156. rootPart.Velocity = Vector3.new(rootPart.Velocity.X, 50, rootPart.Velocity.Z)
  157. elseif jumpCount == 3 then
  158. rootPart.Velocity = Vector3.new(rootPart.Velocity.X, 40, rootPart.Velocity.Z)
  159. isGroundPounding = true
  160. humanoid.PlatformStand = true
  161.  
  162. task.wait(1)
  163. rootPart.Velocity = Vector3.new(0, -100, 0)
  164. task.wait(0.5)
  165.  
  166. humanoid.PlatformStand = false
  167. isGroundPounding = false
  168. jumpCount = 0
  169. end
  170. end
  171. end
  172.  
  173. local function onStateChanged(_, new)
  174. if new == Enum.HumanoidStateType.Landed then
  175. task.wait(0.1)
  176. if not isGroundPounding then
  177. jumpCount = 0
  178. end
  179. end
  180. end
  181.  
  182. local jumpConnection = humanoid.Jumping:Connect(onJump)
  183. local stateConnection = humanoid.StateChanged:Connect(onStateChanged)
  184.  
  185. return function()
  186. jumpConnection:Disconnect()
  187. stateConnection:Disconnect()
  188. if shirt then shirt:Destroy() end
  189. if pants then pants:Destroy() end
  190. end
  191. end
  192.  
  193. -- Current character cleanup function
  194. local currentCleanup = nil
  195.  
  196. -- Create buttons
  197. local laserEyeBtn = createButton("LaserEye", UDim2.new(0.05, 0, 0.05, 0))
  198. local flashBtn = createButton("The Flash", UDim2.new(0.05, 0, 0.35, 0))
  199. local marioBtn = createButton("Mr Mario", UDim2.new(0.05, 0, 0.65, 0))
  200.  
  201. -- Button handlers
  202. laserEyeBtn.MouseButton1Click:Connect(function()
  203. if currentCleanup then currentCleanup() end
  204. currentCleanup = setupLaserEye()
  205. end)
  206.  
  207. flashBtn.MouseButton1Click:Connect(function()
  208. if currentCleanup then currentCleanup() end
  209. currentCleanup = setupFlash()
  210. end)
  211.  
  212. marioBtn.MouseButton1Click:Connect(function()
  213. if currentCleanup then currentCleanup() end
  214. currentCleanup = setupMario()
  215. end)
  216.  
  217. screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
  218.  
Add Comment
Please, Sign In to add comment