Advertisement
sIendytubble

flying steve head

Apr 13th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.39 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85.  
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151. function weldTo(part0, part1)
  152. local weldddd = Instance.new("Weld",part0)
  153. weldddd.Part0 = part0
  154. weldddd.Part1 = part1
  155. end
  156. owner = game.Players.LocalPlayer
  157. -- by fr34ky;
  158. local char = owner.Character
  159.  
  160. moveforwardenabled = false
  161. moveupenabled = false
  162. movedownenabled = false
  163. movebackwardsenabled = false
  164. local player = owner
  165. repeat wait() until player.Character.Humanoid
  166. local humanoid = player.Character.Humanoid
  167. local mouse = player:GetMouse()
  168.  
  169. local weld = Instance.new("Weld",char.Torso)
  170. weld.Part0 = char.Torso
  171.  
  172. local pf = Instance.new("ForceField")
  173. pf.Parent = owner.Character
  174.  
  175. for i,v in pairs(char.Torso:GetChildren()) do
  176. if v.ClassName == 'Decal' then
  177. v:Destroy()
  178. end
  179. end
  180. for i,v in pairs(char:GetChildren()) do
  181. if v.ClassName == 'Accessory' then
  182. v:Destroy()
  183. end
  184. end
  185. for i,v in pairs(char.Head:GetChildren()) do
  186. if v.ClassName == 'Decal' then
  187. v:Destroy()
  188. end
  189. end
  190.  
  191. char.Humanoid.JumpPower = 200
  192. char.Humanoid.Jump = true
  193.  
  194. gui = Instance.new("BillboardGui",char.Torso)
  195. gui.Size = UDim2.new(0, 200,0, 200)
  196. gui.StudsOffset = Vector3.new(0, 8, 0)
  197.  
  198.  
  199. planesound=Instance.new('Sound', char.Torso)
  200. planesound.SoundId = 'rbxassetid://140033290'
  201. planesound.Volume = 0
  202. planesound.Looped = true
  203.  
  204. pullup=Instance.new('Sound', char.Torso)
  205. pullup.SoundId = 'rbxassetid://144560522'
  206. pullup.Volume = 10
  207. pullup.Looped = true
  208.  
  209. alarm=Instance.new('Sound', char.Torso)
  210. alarm.SoundId = 'rbxassetid://384231761'
  211. alarm.Volume = 10
  212. alarm.Looped = true
  213.  
  214.  
  215. screech=Instance.new('Sound', char.Torso)
  216. screech.SoundId = 'rbxassetid://262353320'
  217. screech.Volume = 10
  218.  
  219. st=Instance.new('Sound', char.Torso)
  220. st.SoundId = 'rbxassetid://131353021'
  221. st.Volume = 20
  222.  
  223. allahuakbar=Instance.new('Sound', char)
  224. allahuakbar.SoundId = 'rbxassetid://293292782'
  225. allahuakbar.Volume = 10
  226.  
  227. moosic=Instance.new('Sound', char)
  228. moosic.SoundId = 'rbxassetid://504630746'
  229. moosic.Volume = 2
  230.  
  231. allahuakbar2=Instance.new('Sound', char)
  232. allahuakbar2.SoundId = 'rbxassetid://446824013' --446824013
  233. allahuakbar2.Volume = 1
  234.  
  235.  
  236. planesound:Play()
  237.  
  238. explosionf=Instance.new('ParticleEmitter', char.Torso)
  239. explosionf.Texture = 'http://www.roblox.com/asset/?id=244514357'
  240. explosionf.Size = NumberSequence.new(19)
  241. explosionf.Rate = 1000
  242. explosionf.LightEmission = 0.4
  243. explosionf.Lifetime = NumberRange.new(1)
  244. explosionf.VelocitySpread = 360
  245. explosionf.Enabled = false
  246.  
  247.  
  248.  
  249. char.Head.Transparency = 0
  250. char.Torso.Transparency = 1
  251. char['Left Arm'].Transparency = 1
  252. char['Right Arm'].Transparency = 1
  253. char['Left Leg'].Transparency = 1
  254. char['Right Leg'].Transparency = 1
  255. head = char.Head
  256. camera = Instance.new("Part",head)
  257. camera.Size = Vector3.new(1,1,1)
  258. cameramesh = Instance.new("SpecialMesh",camera)
  259. cameramesh.Scale = Vector3.new(0.5,0.5,0.5)
  260. cameramesh.MeshId = "rbxassetid://2540333271"
  261. cameramesh.TextureId = 'rbxassetid://2540333290'
  262. cameraweld = Instance.new("Weld",camera)
  263. cameraweld.Part0 = head
  264. cameraweld.Part1 = camera
  265. cameraweld.C0 = CFrame.new(-0.1,1.1,-0.1) * CFrame.Angles(0,math.rad(180),0)
  266. for i,v in pairs(head:GetChildren()) do
  267. if v.ClassName == "SpecialMesh" then
  268. v.Parent = nil
  269. end
  270. end
  271. head.LocalTransparencyModifier = 1
  272. --camera = Instance.new("Part",char)
  273. --cameramesh = Instance.new("SpecialMesh",camera)
  274. --cameramesh.MeshId = 'rbxassetid://2540333271'
  275. --cameramesh.Scale = Vector3.new(0.5, 0.5, 0.5)
  276. --camera.Size = Vector3.new(1,1,1)
  277. --cameraweld = Instance.new("Weld",char)
  278. --cameraweld.C0 = CFrame.new(-0.1,1.1,0) * CFrame.Angles(0,-math.rad(180),0)
  279. --cameraweld.Part0 = head
  280. --cameraweld.Part1 = camera
  281. for i,v in pairs(char:GetChildren()) do
  282. if v.ClassName == "Part" and v.Name ~= "Head" then
  283. weldTo(head, v)
  284. end
  285. end
  286. head.Size = Vector3.new(1.3, 1.3, 1.3)
  287. headdecal6 = Instance.new("Decal",head)
  288. headdecal6.Face = "Front"
  289. headdecal6.Texture = "https://www.roblox.com/asset/?id=36047310"
  290. headdecal1 = Instance.new("Decal",head)
  291. headdecal6.LocalTransparencyModifier = 0
  292. headdecal1.Face = "Left"
  293. headdecal1.Texture = "http://www.roblox.com/asset/?id=36047323"
  294. headdecal1.LocalTransparencyModifier = 0
  295. headdecal2 = Instance.new("Decal",head)
  296. headdecal2.Face = "Bottom"
  297. headdecal2.Texture = "http://www.roblox.com/asset/?id=36047347"
  298. headdecal2.LocalTransparencyModifier = 0
  299. headdecal3 = Instance.new("Decal",head)
  300. headdecal3.Face = "Top"
  301. headdecal3.Texture = "http://www.roblox.com/asset/?id=36047341"
  302. headdecal3.LocalTransparencyModifier = 0
  303. headdecal4 = Instance.new("Decal",head)
  304. headdecal4.Face = "Back"
  305. headdecal4.Texture = "http://www.roblox.com/asset/?id=36047330"
  306. headdecal4.LocalTransparencyModifier = 0
  307. headdecal5 = Instance.new("Decal",head)
  308. headdecal5.Face = "Right"
  309. headdecal5.Texture = "http://www.roblox.com/asset/?id=36047315"
  310. headdecal5.LocalTransparencyModifier = 0
  311. char['Left Arm'].Transparency = 1
  312. char['Right Arm'].Transparency = 1
  313. char['Left Leg'].Transparency = 1
  314. char['Right Leg'].Transparency = 1
  315.  
  316. repeat wait(1)until owner and owner.Character and owner:GetMouse() and game:FindService("Workspace") and game.Workspace.CurrentCamera
  317. local Me = game:GetService("Players").LocalPlayer
  318. local Char = Me.Character
  319. local Mouse = Me:GetMouse()
  320. local Cam = Workspace.CurrentCamera
  321. local Stop = false
  322. local Version = 0
  323. local MaxSpeed = 8
  324. local Speed = 8
  325. local Keys = {}
  326. local Force = 10000 -- 10000 = Fly, 1000000 = Noclip
  327.  
  328. game:GetService("RunService").RenderStepped:connect(function()
  329. if humanoid.Health > 0 then
  330. if moveforwardenabled == true then
  331. char.Torso.CFrame= Char.Torso.CFrame * CFrame.new(0,0,-0.5)
  332. end
  333. if movebackwardsenabled == true then
  334. char.Torso.CFrame= Char.Torso.CFrame * CFrame.new(0,0,0.5)
  335. end
  336. if moveupenabled == true then
  337. char.Torso.CFrame= Char.Torso.CFrame * CFrame.new(0,0.5,0)
  338. end
  339. if movedownenabled == true then
  340. char.Torso.CFrame= Char.Torso.CFrame * CFrame.new(0,-0.5,0)
  341. end
  342. char.Torso.CFrame = CFrame.new(head.Position, Mouse.Hit.p)
  343. end
  344. end)
  345.  
  346. char.Torso.Anchored = true
  347.  
  348. mouse.KeyDown:connect(function(key)
  349. if key == "w" then
  350. moveforwardenabled = true
  351. end
  352. end)
  353. mouse.KeyUp:connect(function(key)
  354. if key == "w" then
  355. moveforwardenabled = false
  356. end
  357. end)
  358. mouse.KeyDown:connect(function(key)
  359. if key == "s" then
  360. movebackwardsenabled = true
  361. end
  362. end)
  363. mouse.KeyUp:connect(function(key)
  364. if key == "s" then
  365. movebackwardsenabled = false
  366. end
  367. end)
  368. mouse.KeyDown:connect(function(key)
  369. if key == "u" then
  370. moveupenabled = true
  371. end
  372. end)
  373. mouse.KeyUp:connect(function(key)
  374. if key == "u" then
  375. moveupenabled = false
  376. end
  377. end)
  378. mouse.KeyDown:connect(function(key)
  379. if key == "q" then
  380. movedownenabled = true
  381. end
  382. end)
  383. mouse.KeyUp:connect(function(key)
  384. if key == "q" then
  385. movedownenabled = false
  386. end
  387. end)
  388. -----------------
  389. --| Constants |--
  390. -----------------
  391.  
  392. local GRAVITY_ACCELERATION = workspace.Gravity
  393. local RELOAD_TIME = 0.1 -- Seconds until tool can be used again
  394. local ROCKET_SPEED = 500 -- Speed of the projectile
  395.  
  396. local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534'
  397. local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25)
  398. local ROCKET_PART_SIZE = Vector3.new(0.2, 0.5, 0.2)
  399.  
  400. -----------------
  401. --| Variables |--
  402. -----------------
  403.  
  404. local DebrisService = game:GetService('Debris')
  405. local PlayersService = game:GetService('Players')
  406.  
  407. local MyPlayer
  408. --NOTE: We create the rocket once and then clone it when the player fires
  409. local Rocket = Instance.new('Part') do
  410. -- Set up the rocket part
  411. Rocket.Name = 'Rocket'
  412. Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
  413. Rocket.Size = ROCKET_PART_SIZE
  414. Rocket.CanCollide = false
  415. Rocket.BrickColor = BrickColor.new("Bright yellow")
  416.  
  417. -- Add a force to counteract gravity
  418. local bodyForce = Instance.new('BodyForce', Rocket)
  419. bodyForce.Name = 'Antigravity'
  420. bodyForce.Force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0)
  421.  
  422. -- Clone the sounds and set Boom to PlayOnRemove
  423.  
  424. -- Attach creator tags to the rocket early on
  425. local creatorTag = Instance.new('ObjectValue', Rocket)
  426. creatorTag.Value = player
  427. creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats
  428.  
  429. -- Finally, clone the rocket script and enable it
  430. end
  431.  
  432. -----------------
  433. --| Functions |--
  434. -----------------
  435. local function OnTouchedFire(target)
  436. if target.Name ~= "Baseplate" then
  437. Instance.new("Fire",target)
  438. Mouse.Target.BrickColor = BrickColor.new("Maroon")
  439. local sound1 = Instance.new("Sound")
  440. sound1.Parent = target
  441. sound1.SoundId = "http://www.roblox.com/asset/?id=31760113"
  442. sound1.Looped = true
  443. sound1:Play()
  444. wait(10)
  445. target:Destroy()
  446. end
  447. end
  448. local function OnActivated(target)
  449. if target.Name ~= "Baseplate" then
  450. Instance.new("Fire",target)
  451. target.BrickColor = BrickColor.new("Maroon")
  452. local sound1 = Instance.new("Sound")
  453. sound1.Parent = target
  454. sound1.SoundId = "http://www.roblox.com/asset/?id=31760113"
  455. sound1.Looped = true
  456. sound1:Play()
  457. wait(10)
  458. target.Touched:connect(OnTouchedFire)
  459. target.Anchored = false
  460. wait()
  461. target:Destroy()
  462. end
  463. end
  464.  
  465. Mouse.KeyDown:connect(function(key)
  466. if key == "r" then
  467. OnActivated(Mouse.Target)
  468. end
  469. end)
  470. --------------------
  471. --| Script Logic |--
  472. --------------------
  473.  
  474.  
  475. Enabled = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement