Advertisement
HenloMyDude

FlyingBighead

Aug 14th, 2019
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.79 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  7. do
  8. script.Parent = owner.Character
  9. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  10. local function NewFakeEvent()
  11. local Bind = Instance.new("BindableEvent")
  12. local Fake;Fake = {Connections = {},
  13. fakeEvent=true;
  14. Connect=function(self,Func)
  15. Bind.Event:connect(Func)
  16. self.Connections[Bind] = true
  17. return setmetatable({Connected = true},{
  18. __index = function (self,Index)
  19. if Index:lower() == "disconnect" then
  20. return function() Fake.Connections[Bind] = false;self.Connected = false end
  21. end
  22. return Fake[Index]
  23. end;
  24. __tostring = function() return "Connection" end;
  25. })
  26. end}
  27. Fake.connect = Fake.Connect;return Fake;
  28. end
  29. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  30. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  31. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  32. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  33. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  34. local function TriggerEvent(self,Event,...)
  35. local Trigger = Mouse[Event]
  36. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  37. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  38. end
  39. end
  40. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  41. Event.OnServerEvent:Connect(function(FiredBy,Input)
  42. if FiredBy.Name ~= owner.Name then return end
  43. if Input.MouseEvent then
  44. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  45. else
  46. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  47. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  48. for _,Action in pairs(ContextActionService.Actions) do
  49. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  50. end
  51. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  52. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  53. end
  54. end)
  55. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  56. Event.Parent = NLS([[
  57. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  58. local Input = function(Input,gameProcessedEvent)
  59. if gameProcessedEvent then return end
  60. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  61. end
  62. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  63. local Hit,Target
  64. while wait(1/30) do
  65. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  66. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  67. end
  68. end
  69. ]],owner.Character)
  70. end
  71. RealGame = game;game = setmetatable({},{
  72. __index = function (self,Index)
  73. local Sandbox = function (Thing)
  74. if Thing:IsA("Player") then
  75. local RealPlayer = Thing
  76. return setmetatable({},{
  77. __index = function (self,Index)
  78. local Type = type(RealPlayer[Index])
  79. if Type == "function" then
  80. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  81. return function (self)return InternalData["Mouse"] end
  82. end
  83. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  84. end
  85. return RealPlayer[Index]
  86. end;
  87. __tostring = function(self) return RealPlayer.Name end
  88. })
  89. end
  90. end
  91. if RealGame[Index] then
  92. local Type = type(RealGame[Index])
  93. if Type == "function" then
  94. if Index:lower() == "getservice" or Index:lower() == "service" then
  95. return function (self,Service)
  96. local FakeServices = {
  97. ["players"] = function()
  98. return setmetatable({},{
  99. __index = function (self2,Index2)
  100. local RealService = RealGame:GetService(Service)
  101. local Type2 = type(Index2)
  102. if Type2 == "function" then
  103. return function (self,...) return RealService[Index2](RealService,...)end
  104. else
  105. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  106. return RealService[Index2]
  107. end
  108. end;
  109. __tostring = function(self) return RealGame:GetService(Service).Name end
  110. })
  111. end;
  112. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  113. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  114. ["runservice"] = function()
  115. return setmetatable({},{
  116. __index = function(self2,Index2)
  117. local RealService = RealGame:GetService(Service)
  118. local Type2 = type(Index2)
  119. if Type2 == "function" then
  120. return function (self,...) return RealService[Index2](RealService,...) end
  121. else
  122. local RunServices = {
  123. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  124. ["renderstepped"] = function() return RealService["Stepped"] end
  125. }
  126. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  127. return RealService[Index2]
  128. end
  129. end
  130. })
  131. end
  132. }
  133. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  134. return RealGame:GetService(Service)
  135. end
  136. end
  137. return function (self,...) return RealGame[Index](RealGame,...) end
  138. else
  139. if game:GetService(Index) then return game:GetService(Index) end
  140. return RealGame[Index]
  141. end
  142. end
  143. return nil
  144. end
  145. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  146.  
  147. plr = owner
  148. char = plr.Character
  149. hum = char.Humanoid
  150. hum.WalkSpeed = 50
  151. root = char.HumanoidRootPart
  152. mouse = plr:GetMouse()
  153. biggerhead = false
  154.  
  155. for _,v in pairs (char:children()) do
  156. if v:IsA("Part") then
  157. v.Transparency = 1
  158. if v.Name == "Head" then
  159. v.face:Destroy()
  160. v.Transparency = 0.9
  161. v.BrickColor = BrickColor.new("White")
  162. v.Size = Vector3.new(0.1, 0.1, 0.1)
  163. end
  164. end
  165. if v:IsA("Accessory") or v:IsA("Hat") or v:IsA("Hair") then
  166. v:Destroy()
  167. end
  168. end
  169.  
  170. foot = Instance.new("Part",root)
  171. foot.CFrame = root.CFrame
  172. weld = Instance.new("Weld",foot)
  173. weld.Part0 = foot
  174. weld.Part1 = root
  175. weld:Destroy()
  176. bighead = Instance.new("SpecialMesh",foot)
  177. bighead.MeshId = "rbxassetid://1047997"
  178. bighead.TextureId = "rbxassetid://1047998"
  179. bighead.Scale = bighead.Scale + Vector3.new(3, 3, 3)
  180.  
  181. beamm = Instance.new("Model",char)
  182.  
  183. mouse.KeyDown:connect(function(key)
  184. key=key:lower()
  185. if key == "n" then
  186. hum.HipHeight = hum.HipHeight - 5
  187. end
  188. if key == "m" then
  189. hum.HipHeight = hum.HipHeight + 5
  190. end
  191. end)
  192.  
  193. mouse.KeyDown:connect(function(key)
  194. key=key:lower()
  195. if key == 'b' then
  196. if biggerhead then
  197. biggerhead = false
  198. bighead.MeshId = "rbxassetid://1047997"
  199. bighead.TextureId = "rbxassetid://1047998"
  200. bighead.Scale = bighead.Scale - Vector3.new(2, 2, 2)
  201. else
  202. biggerhead = true
  203. bighead.MeshId = "rbxassetid://1047997"
  204. bighead.TextureId = "rbxassetid://606673948"
  205. bighead.Scale = bighead.Scale + Vector3.new(2, 2, 2)
  206. end
  207. end
  208.  
  209.  
  210. if key == 'z' then
  211. local beam = Instance.new("Part",workspace)
  212. beam.Material = "Neon"
  213. beam.Size = Vector3.new(10, 10, 10)
  214. beam.Shape = "Ball"
  215. if biggerhead then
  216. beam.Size = Vector3.new(20, 20, 20)
  217. end
  218. if biggerhead then
  219. beam.BrickColor = BrickColor.new("Really red")
  220. else
  221. beam.BrickColor = BrickColor.new("New Yeller")
  222. end
  223. beam.Position = mouse.Hit.p
  224. beam.Anchored = true
  225. beam.CanCollide = false
  226. local hitter = beam.Touched:connect(function(hit)
  227. if hit.Parent ~= char and hit.Parent then
  228. for _,v in pairs (hit.Parent:children()) do
  229. if v:IsA("Humanoid") then
  230. v.Health = v.Health - 15
  231. end
  232. end
  233. end
  234. end)
  235. for i = 1,15 do
  236. beam.Transparency = beam.Transparency + 0.1
  237. beam.Size = beam.Size + Vector3.new(1, 1, 1)
  238. wait()
  239. end
  240. wait(0.1)
  241. beam:Destroy()
  242. end
  243. end)
  244.  
  245. mouse.KeyUp:connect(function(key)
  246. if key == "n" then
  247. hum.HipHeight = hum.HipHeight
  248. end
  249. if key == "m" then
  250. hum.HipHeight = hum.HipHeight
  251. end
  252. end)
  253.  
  254. mouse.Button1Down:connect(function()
  255. local beam = Instance.new("Part",workspace)
  256. beam.Material = "Neon"
  257. beam.Size = Vector3.new(10, 10, 999)
  258. if biggerhead then
  259. beam.Size = Vector3.new(20, 20, 999)
  260. end
  261. if biggerhead then
  262. beam.BrickColor = BrickColor.new("Really red")
  263. else
  264. beam.BrickColor = BrickColor.new("New Yeller")
  265. end
  266. beam.CFrame = CFrame.new(root.Position, mouse.Hit.p) * CFrame.new(0, 0, 0)
  267. beam.Anchored = true
  268. beam.CanCollide = false
  269.  
  270. local hitter = beam.Touched:connect(function(hit)
  271. if hit.Parent ~= char and hit.Parent then
  272. for _,v in pairs (hit.Parent:children()) do
  273. if v:IsA("Humanoid") then
  274. v.Health = v.Health - 50
  275. end
  276. end
  277. end
  278. end)
  279.  
  280. local mesh = Instance.new("SpecialMesh",beam)
  281. mesh.MeshType = Enum.MeshType.Sphere
  282. mesh.Offset = Vector3.new(0, 0, -500)
  283. for i = 1,15 do
  284. beam.Transparency = beam.Transparency + 0.1
  285. wait()
  286. end
  287. wait(0.5)
  288. beam:Destroy()
  289. end)
  290.  
  291. while true do
  292. wait()
  293. foot.Anchored = true
  294. foot.CanCollide = false
  295. foot.CFrame = CFrame.new(char.Torso.Position, mouse.Hit.p)
  296. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement