Advertisement
zephpsian

Untitled

Feb 10th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.61 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 Frame = Instance.new("Frame")
  92. local bar = Instance.new("Frame")
  93. local TextLabel = Instance.new("TextLabel")
  94. local TextBox = Instance.new("TextBox")
  95. local TextButton = Instance.new("TextButton")
  96. local kick = Instance.new("TextButton")
  97. local des = Instance.new("TextButton")
  98. --Properties:
  99. ScreenGui.Parent = game.Players.G_osty:WaitForChild("PlayerGui")
  100. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  101.  
  102. Frame.Parent = ScreenGui
  103. Frame.BackgroundColor3 = Color3.new(0.211765, 0.211765, 0.211765)
  104. Frame.BorderSizePixel = 0
  105. Frame.Position = UDim2.new(0.664233565, 0, 0.266497463, 0)
  106. Frame.Size = UDim2.new(0, 295, 0, 240)
  107.  
  108. bar.Name = "bar"
  109. bar.Parent = Frame
  110. bar.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
  111. bar.BorderSizePixel = 0
  112. bar.Size = UDim2.new(0, 295, 0, 27)
  113.  
  114. TextLabel.Parent = bar
  115. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  116. TextLabel.BackgroundTransparency = 1
  117. TextLabel.BorderSizePixel = 0
  118. TextLabel.Size = UDim2.new(0, 295, 0, 27)
  119. TextLabel.Font = Enum.Font.GothamSemibold
  120. TextLabel.Text = "G_osty's Magical GUI"
  121. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  122. TextLabel.TextSize = 20
  123. TextLabel.TextStrokeColor3 = Color3.new(1, 1, 1)
  124. TextLabel.TextWrapped = true
  125.  
  126. TextBox.Parent = Frame
  127. TextBox.BackgroundColor3 = Color3.new(0.290196, 0.290196, 0.290196)
  128. TextBox.BorderSizePixel = 0
  129. TextBox.Position = UDim2.new(0.0456252843, 0, 0.295833319, 0)
  130. TextBox.Size = UDim2.new(0, 133, 0, 29)
  131. TextBox.Font = Enum.Font.GothamSemibold
  132. TextBox.PlaceholderColor3 = Color3.new(0.698039, 0.698039, 0.698039)
  133. TextBox.Text = ""
  134. TextBox.TextColor3 = Color3.new(1, 1, 1)
  135. TextBox.TextSize = 17
  136.  
  137. TextButton.Parent = Frame
  138. TextButton.BackgroundColor3 = Color3.new(0.290196, 0.290196, 0.290196)
  139. TextButton.BorderSizePixel = 0
  140. TextButton.Position = UDim2.new(0.0456252843, 0, 0.583333313, 0)
  141. TextButton.Size = UDim2.new(0, 133, 0, 28)
  142. TextButton.Font = Enum.Font.GothamSemibold
  143. TextButton.Text = "gay em"
  144. TextButton.TextColor3 = Color3.new(1, 1, 1)
  145. TextButton.TextSize = 17
  146.  
  147. kick.Name = "kick"
  148. kick.Parent = Frame
  149. kick.BackgroundColor3 = Color3.new(0.290196, 0.290196, 0.290196)
  150. kick.BorderSizePixel = 0
  151. kick.Position = UDim2.new(0.52359134, 0, 0.29583329, 0)
  152. kick.Size = UDim2.new(0, 133, 0, 28)
  153. kick.Font = Enum.Font.GothamSemibold
  154. kick.Text = "Kick Player"
  155. kick.TextColor3 = Color3.new(1, 1, 1)
  156. kick.TextSize = 17
  157.  
  158. des.Name = "des"
  159. des.Parent = Frame
  160. des.BackgroundColor3 = Color3.new(0.290196, 0.290196, 0.290196)
  161. des.BorderSizePixel = 0
  162. des.Position = UDim2.new(0.52359134, 0, 0.583333254, 0)
  163. des.Size = UDim2.new(0, 133, 0, 28)
  164. des.Font = Enum.Font.GothamSemibold
  165. des.Text = "Clr workspace"
  166. des.TextColor3 = Color3.new(1, 1, 1)
  167. des.TextSize = 17
  168. -- Scripts:
  169.  
  170. des.MouseButton1Click:connect(function()
  171. game.Workspace:ClearAllChildren()
  172. end)
  173.  
  174.  
  175. kick.MouseButton1Click:connect(function()
  176. game.Players[TextBox.Text]:Kick("G_osty has kicked you from the game.")
  177. end)
  178.  
  179.  
  180. TextButton.MouseButton1Click:connect(function()
  181.  
  182.  
  183. local pants = Instance.new("Pants")
  184. local shirt = Instance.new("Shirt")
  185.  
  186. if game.Workspace[TextBox.Text].Pants then
  187. game.Workspace[TextBox.Text].Pants:Destroy()
  188. end
  189.  
  190. if game.Workspace[TextBox.Text].Shirt then
  191. game.Workspace[TextBox.Text].Shirt:Destroy()
  192. end
  193.  
  194.  
  195.  
  196.  
  197. shirt.ShirtTemplate = "rbxassetid://2583005135"
  198. shirt.Parent = game.Workspace[TextBox.Text]
  199.  
  200. pants.PantsTemplate = "rbxassetid://2191494311"
  201. pants.Parent = game.Workspace[TextBox.Text]
  202.  
  203.  
  204.  
  205.  
  206. end)
  207.  
  208. game.Players.G_osty.Chatted:connect(function(msg)
  209. TextBox.Text = msg
  210. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement