Advertisement
iiJosephCats205

gui XD

Jul 19th, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.91 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. -- Farewell Infortality.
  88. -- Version: 2.82
  89. -- Instances:
  90. local ScreenGui = Instance.new("ScreenGui")
  91. local ooffame = Instance.new("Frame")
  92. local TextLabel = Instance.new("TextLabel")
  93. local Frame = Instance.new("Frame")
  94. local TextBox = Instance.new("TextBox")
  95. local TextButton = Instance.new("TextButton")
  96. --Properties:
  97. ScreenGui.Parent = owner:WaitForChild("PlayerGui")
  98. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  99.  
  100. ooffame.Name = "ooffame"
  101. ooffame.Parent = ScreenGui
  102. ooffame.BackgroundColor3 = Color3.new(1, 1, 1)
  103. ooffame.BorderSizePixel = 0
  104. ooffame.Position = UDim2.new(0.0499058403, 0, 0.573705196, 0)
  105. ooffame.Size = UDim2.new(0, 380, 0, 187)
  106.  
  107. TextLabel.Parent = ooffame
  108. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  109. TextLabel.BorderSizePixel = 0
  110. TextLabel.Size = UDim2.new(0, 380, 0, 46)
  111. TextLabel.Font = Enum.Font.SourceSans
  112. TextLabel.Text = "Add Bricks To Player."
  113. TextLabel.TextColor3 = Color3.new(0, 0, 0)
  114. TextLabel.TextScaled = true
  115. TextLabel.TextSize = 14
  116. TextLabel.TextWrapped = true
  117.  
  118. Frame.Parent = ooffame
  119. Frame.BackgroundColor3 = Color3.new(0, 0, 0.258824)
  120. Frame.Position = UDim2.new(0, 0, 0.245989308, 0)
  121. Frame.Size = UDim2.new(0, 380, 0, 6)
  122.  
  123. TextBox.Parent = ooffame
  124. TextBox.BackgroundColor3 = Color3.new(0.666667, 0, 0)
  125. TextBox.Position = UDim2.new(0.236842111, 0, 0.363636374, 0)
  126. TextBox.Size = UDim2.new(0, 200, 0, 33)
  127. TextBox.Font = Enum.Font.Garamond
  128. TextBox.Text = "Username"
  129. TextBox.TextColor3 = Color3.new(1, 1, 1)
  130. TextBox.TextScaled = true
  131. TextBox.TextSize = 14
  132. TextBox.TextWrapped = true
  133.  
  134. TextButton.Parent = ooffame
  135. TextButton.BackgroundColor3 = Color3.new(0, 0.333333, 0)
  136. TextButton.Position = UDim2.new(0, 90, 0, 130)
  137. TextButton.Size = UDim2.new(0, 200, 0, 31)
  138. TextButton.Font = Enum.Font.Gotham
  139. TextButton.Text = "LET IT GROW"
  140. TextButton.TextColor3 = Color3.new(1, 1, 1)
  141. TextButton.TextScaled = true
  142. TextButton.TextSize = 14
  143. TextButton.TextWrapped = true
  144. -- Scripts:
  145.  
  146. TextButton.MouseButton1Down:Connect(function()
  147. local VIC = TextBox.Text
  148. if game.Players:FindFirstChild(VIC) then
  149. local LocalPlayer = game:GetService("Players")[VIC]
  150. local Character = LocalPlayer.Character
  151. local Position = Vector3.new(0,100,0)
  152.  
  153.  
  154. local Ball1 = Instance.new("Part", Character)
  155. Ball1.Size = Vector3.new(1.3,1.3,1.3)
  156. Ball1.Shape = "Ball"
  157. Ball1.BrickColor = BrickColor.new("Pastel brown")
  158. Ball1.TopSurface = "Smooth"
  159. Ball1.BottomSurface = "Smooth"
  160. Ball1.FormFactor = 'Custom'
  161. Ball1.Position = Position + Vector3.new(0,10,0)
  162.  
  163. local Ball1Weld = Instance.new("Weld", Character.Torso)
  164. Ball1Weld.Part0 = Character.Torso
  165. Ball1Weld.Part1 = Ball1
  166. Ball1Weld.C1 = CFrame.new(.5,-.3,.4)
  167.  
  168. local Ball2 = Instance.new("Part", Character)
  169. Ball2.Size = Vector3.new(1.3,1.3,1.3)
  170. Ball2.Shape = "Ball"
  171. Ball2.BrickColor = BrickColor.new("Pastel brown")
  172. Ball2.TopSurface = "Smooth"
  173. Ball2.BottomSurface = "Smooth"
  174. Ball2.FormFactor = 'Custom'
  175. Ball2.Position = Position + Vector3.new(0,10,0)
  176.  
  177. local Ball2Weld = Instance.new("Weld", Character.Torso)
  178. Ball2Weld.Part0 = Character.Torso
  179. Ball2Weld.Part1 = Ball2
  180. Ball2Weld.C1 = CFrame.new(-.5,-.3,.4)
  181.  
  182. local Ball3 = Instance.new("Part", Character)
  183. Ball3.Size = Vector3.new(.4,.4,.4)
  184. Ball3.Shape = "Ball"
  185. Ball3.BrickColor = BrickColor.new("Brown")
  186. Ball3.TopSurface = "Smooth"
  187. Ball3.BottomSurface = "Smooth"
  188. Ball3.FormFactor = 'Custom'
  189. Ball3.Position = Position + Vector3.new(0,10,0)
  190.  
  191. local Ball3Weld = Instance.new("Weld", Character.Torso)
  192. Ball3Weld.Part0 = Character.Torso
  193. Ball3Weld.Part1 = Ball3
  194. Ball3Weld.C1 = CFrame.new(-.5,-.3,.9)
  195.  
  196. local Ball4 = Instance.new("Part", Character)
  197. Ball4.Size = Vector3.new(.4,.4,.4)
  198. Ball4.Shape = "Ball"
  199.  
  200. Ball4.BrickColor = BrickColor.new("Brown")
  201. Ball4.TopSurface = "Smooth"
  202. Ball4.BottomSurface = "Smooth"
  203. Ball4.FormFactor = 'Custom'
  204. Ball4.Position = Position + Vector3.new(0,10,0)
  205.  
  206. local Ball4Weld = Instance.new("Weld", Character.Torso)
  207. Ball4Weld.Part0 = Character.Torso
  208. Ball4Weld.Part1 = Ball4
  209. Ball4Weld.C1 = CFrame.new(.5,-.3,.9)
  210.  
  211. local Ball5 = Instance.new("Part", Character)
  212. Ball5.Size = Vector3.new(1.2,1.2,1.2)
  213. Ball5.Shape = "Ball"
  214. Ball5.BrickColor = BrickColor.new("Pastel brown")
  215. Ball5.TopSurface = "Smooth"
  216. Ball5.BottomSurface = "Smooth"
  217. Ball5.FormFactor = 'Custom'
  218. Ball5.Position = Position + Vector3.new(0,10,0)
  219.  
  220. local Ball5Weld = Instance.new("Weld", Character.Torso)
  221. Ball5Weld.Part0 = Character.Torso
  222. Ball5Weld.Part1 = Ball5
  223. Ball5Weld.C1 = CFrame.new(-.5,.9,-.4)
  224.  
  225. local Ball6 = Instance.new("Part", Character)
  226. Ball6.Size = Vector3.new(1.2,1.2,1.2)
  227. Ball6.Shape = "Ball"
  228. Ball6.BrickColor = BrickColor.new("Pastel brown")
  229. Ball6.TopSurface = "Smooth"
  230. Ball6.BottomSurface = "Smooth"
  231. Ball6.FormFactor = 'Custom'
  232. Ball6.Position = Position + Vector3.new(0,10,0)
  233.  
  234. local Ball6Weld = Instance.new("Weld", Character.Torso)
  235. Ball6Weld.Part0 = Character.Torso
  236. Ball6Weld.Part1 = Ball6
  237. Ball6Weld.C1 = CFrame.new(.5,.9,-.4)
  238. end
  239. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement