Advertisement
Guest User

K00lkidd81 gui

a guest
Jul 13th, 2024
3,770
2
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.16 KB | None | 2 0
  1. -- Server Script (ServerScriptService or ServerScript)
  2. -- Create RemoteEvent
  3. local fireEvent = Instance.new("RemoteEvent")
  4. fireEvent.Name = "FireEvent"
  5. fireEvent.Parent = game:GetService("ReplicatedStorage") -- ReplicatedStorage is used for storing objects that need to be replicated to all clients
  6.  
  7. -- Function to handle firing effect
  8. local function fireOnPlayers()
  9. -- Get all players in the game
  10. local players = game:GetService("Players"):GetPlayers()
  11.  
  12. -- Loop through each player and apply the "fire" effect
  13. for _, player in ipairs(players) do
  14. -- Perform fire effect on each player (example: teleport them to a fire location, damage them, etc.)
  15. -- Replace this with your desired fire effect
  16. print("Firing on player:", player.Name)
  17. -- Example: teleport player to a fire location
  18. -- local fireLocation = Vector3.new(0, 100, 0) -- Example fire location
  19. -- player.Character:MoveTo(fireLocation)
  20. end
  21. end
  22.  
  23. -- Listen for RemoteEvent triggered by clients
  24. fireEvent.OnServerEvent:Connect(function(player)
  25. fireOnPlayers() -- Call the function to fire on all players
  26. end)
  27.  
  28. -- Client Script (LocalScript)
  29. -- Locate where your ScreenGui creation code is and add this LocalScript
  30.  
  31. -- Create ScreenGui
  32. local screenGui = Instance.new("ScreenGui")
  33. screenGui.Name = "CustomGui"
  34. screenGui.ResetOnSpawn = false
  35. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  36.  
  37. -- Function to make the ScreenGui draggable
  38. local function makeDraggable(frame)
  39. local dragging = false
  40. local dragInput, mousePos, framePos
  41.  
  42. frame.InputBegan:Connect(function(input)
  43. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  44. dragging = true
  45. mousePos = input.Position
  46. framePos = frame.Position
  47.  
  48. input.Changed:Connect(function()
  49. if input.UserInputState == Enum.UserInputState.End then
  50. dragging = false
  51. end
  52. end)
  53. end
  54. end)
  55.  
  56. frame.InputChanged:Connect(function(input)
  57. if input.UserInputType == Enum.UserInputType.MouseMovement then
  58. dragInput = input
  59. end
  60. end)
  61.  
  62. game:GetService("UserInputService").InputChanged:Connect(function(input)
  63. if input == dragInput and dragging then
  64. local delta = input.Position - mousePos
  65. frame.Position = UDim2.new(
  66. framePos.X.Scale,
  67. framePos.X.Offset + delta.X,
  68. framePos.Y.Scale,
  69. framePos.Y.Offset + delta.Y
  70. )
  71. end
  72. end)
  73. end
  74.  
  75. -- Create the main frame (ScreenGui)
  76. local frame = Instance.new("Frame")
  77. frame.Size = UDim2.new(0.5, 0, 0.4, 0) -- Adjusted size to be larger
  78. frame.Position = UDim2.new(0.25, 0, 0.3, 0) -- Adjusted position to center
  79. frame.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  80. frame.BorderSizePixel = 5
  81. frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  82. frame.Parent = screenGui
  83. makeDraggable(frame)
  84.  
  85. -- Create the "Open" button to show the ScreenGui
  86. local openButton = Instance.new("TextButton")
  87. openButton.Size = UDim2.new(0.2, 0, 0.1, 0)
  88. openButton.Position = UDim2.new(0.4, 0, 0.85, 0)
  89. openButton.Text = "Open"
  90. openButton.Parent = screenGui
  91. openButton.MouseButton1Click:Connect(function()
  92. frame.Visible = true
  93. openButton.Visible = false -- Hide the Open button when frame is open
  94. closeButton.Visible = true -- Show the Close button when frame is open
  95. end)
  96.  
  97. -- Create the "Close" button to hide the ScreenGui
  98. local closeButton = Instance.new("TextButton")
  99. closeButton.Size = UDim2.new(0.2, 0, 0.1, 0)
  100. closeButton.Position = UDim2.new(0.6, 0, 0.85, 0)
  101. closeButton.Text = "Close"
  102. closeButton.Visible = false -- Initially hide Close button
  103. closeButton.Parent = screenGui
  104. closeButton.MouseButton1Click:Connect(function()
  105. frame.Visible = false
  106. openButton.Visible = true -- Show the Open button when frame is closed
  107. closeButton.Visible = false -- Hide the Close button when frame is closed
  108. end)
  109.  
  110. -- Create the "Fire" button to fire on all players
  111. local fireButton = Instance.new("TextButton")
  112. fireButton.Size = UDim2.new(0.2, 0, 0.1, 0)
  113. fireButton.Position = UDim2.new(0.4, 0, 0.7, 0)
  114. fireButton.Text = "Fire on All Players"
  115. fireButton.Parent = screenGui
  116. fireButton.MouseButton1Click:Connect(function()
  117. fireEvent:FireServer() -- Fire the RemoteEvent to all clients
  118. end)
  119.  
  120. -- Create the "k00lkidd81 laugh" button
  121. local laughButton = Instance.new("TextButton")
  122. laughButton.Size = UDim2.new(0.8, 0, 0.1, 0)
  123. laughButton.Position = UDim2.new(0.1, 0, 0.1, 0)
  124. laughButton.Text = "k00lkidd81 laugh"
  125. laughButton.Parent = frame
  126. laughButton.MouseButton1Click:Connect(function()
  127. local sound = Instance.new("Sound")
  128. sound.SoundId = "rbxassetid://18475341140"
  129. sound.Parent = game.Workspace
  130. sound:Play()
  131. end)
  132.  
  133. -- Create the "Day to Night" button
  134. local dayNightButton = Instance.new("TextButton")
  135. dayNightButton.Size = UDim2.new(0.8, 0, 0.1, 0)
  136. dayNightButton.Position = UDim2.new(0.1, 0, 0.25, 0)
  137. dayNightButton.Text = "Day to Night"
  138. dayNightButton.Parent = frame
  139. dayNightButton.MouseButton1Click:Connect(function()
  140. local lighting = game:GetService("Lighting")
  141. if lighting.ClockTime >= 6 and lighting.ClockTime < 18 then
  142. lighting.ClockTime = 18
  143. else
  144. lighting.ClockTime = 6
  145. end
  146. end)
  147.  
  148. -- Create the "Play Music" button
  149. local musicButton = Instance.new("TextButton")
  150. musicButton.Size = UDim2.new(0.8, 0, 0.1, 0)
  151. musicButton.Position = UDim2.new(0.1, 0, 0.4, 0)
  152. musicButton.Text = "Play Music"
  153. musicButton.Parent = frame
  154. musicButton.MouseButton1Click:Connect(function()
  155. local sound = Instance.new("Sound")
  156. sound.SoundId = "rbxassetid://18431141543"
  157. sound.Parent = game.Workspace
  158. sound:Play()
  159. end)
  160.  
  161. -- Create the "Hint" label at the top of the screen
  162. local hintLabel = Instance.new("TextLabel")
  163. hintLabel.Size = UDim2.new(0.3, 0, 0.05, 0)
  164. hintLabel.Position = UDim2.new(0.35, 0, 0, 0)
  165. hintLabel.BackgroundTransparency = 1
  166. hintLabel.TextColor3 = Color3.new(1, 1, 1)
  167. hintLabel.TextStrokeTransparency = 0
  168. hintLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  169. hintLabel.TextScaled = true
  170. hintLabel.TextWrapped = true
  171. hintLabel.Font = Enum.Font.SourceSans
  172. hintLabel.Text = "Hacked by k00lkidd81"
  173. hintLabel.Visible = false
  174. hintLabel.Parent = screenGui
  175.  
  176. -- Create the "Message" label at the top of the screen
  177. local messageLabel = Instance.new("TextLabel")
  178. messageLabel.Size = UDim2.new(0.3, 0, 0.05, 0)
  179. messageLabel.Position = UDim2.new(0.35, 0, 0.05, 0)
  180. messageLabel.BackgroundTransparency = 1
  181. messageLabel.TextColor3 = Color3.new(1, 1, 1)
  182. messageLabel.TextStrokeTransparency = 0
  183. messageLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  184. messageLabel.TextScaled = true
  185. messageLabel.TextWrapped = true
  186. messageLabel.Font = Enum.Font.SourceSans
  187. messageLabel.Text = "Hacked by k00lkidd81"
  188. messageLabel.Visible = false
  189. messageLabel.Parent = screenGui
  190.  
  191. -- Update hint and message visibility based on ScreenGui visibility
  192. frame:GetPropertyChangedSignal("Visible"):Connect(function()
  193. local isVisible = frame.Visible
  194. hintLabel.Visible = isVisible
  195. messageLabel.Visible = isVisible
  196. end)
Tags: new script
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement