ManOhMan

Untitled

Aug 11th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ----(Sky's Settings)----
  87. local Player = owner
  88. local Players = game.Players
  89. local Character = Player.Character
  90. ----(Variables)----
  91. local player = owner
  92. local char = player.Character
  93. pie = true
  94.  
  95. nums = owner.Character.Head
  96.  
  97. if pie ==true then
  98. if script.Parent.className ~= "HopperBin" then
  99. h = Instance.new("HopperBin")
  100. h.Parent = player.Backpack
  101. h.Name = "plane"
  102. script.Parent = h
  103. end
  104.  
  105. sp = script.Parent
  106.  
  107. hold = false
  108. miss = {}
  109. function selected(mouse, key)
  110. mouse.Button1Down:connect(function()
  111. if hold == true then return end
  112. hold = true
  113. plane = Instance.new("Part",Game.Workspace)
  114. plane.Parent = Game.Workspace
  115. plane.formFactor = 0
  116. plane.Size = Vector3.new(1,1,5)
  117. plane.Anchored = true
  118. plane.CFrame = CFrame.new(Player.Character.Torso.Position, mouse.Hit.p) * CFrame.new(0,0,-.8)
  119.  
  120. bill2 = Instance.new("BillboardGui", plane)
  121. bill2.Size = UDim2.new(4, 4, 4, 4)
  122. bill2.AlwaysOnTop = false
  123. label2 = Instance.new("TextLabel", bill2)
  124. label2.Size = UDim2.new(1,2,1,2)
  125. label2.Position = UDim2.new(0, 0, -.65, 0)
  126. label2.TextColor3 = Color3.new(0, 0, 0)
  127. label2.TextStrokeTransparency = 0
  128. label2.TextStrokeColor3 = Color3.new(255, 255, 255)
  129. label2.BackgroundTransparency = 1
  130. label2.Visible = true
  131. label2.Font = 'SourceSansBold'
  132. label2.FontSize = 'Size36'
  133. label2.Text = "Plane(Scout)"
  134. Player.Chatted:connect(function(msg)
  135. label2.Text = msg
  136. end)
  137.  
  138. mesh = Instance.new("FileMesh", plane)
  139. mesh.MeshId = "http://www.roblox.com/asset?id=113216991"
  140. mesh.TextureId = "http://www.roblox.com/asset?id=113216977"
  141. mesh.Scale = Vector3.new(4,4,4)
  142. workspace.CurrentCamera.CameraSubject = plane
  143. table.insert(miss,plane)
  144. while hold == true do
  145. wait()
  146. plane.CFrame = CFrame.new(plane.Position, mouse.Hit.p)
  147. plane.CFrame = plane.CFrame * CFrame.new(0,0,-.8)
  148. end
  149. end)
  150. mouse.Button1Up:connect(function()
  151. end)
  152. end
  153.  
  154. sp.Selected:connect(selected)
  155.  
  156. end
  157.  
  158.  
  159. --[[local vehseat = Instance.new('VehicleSeat',plane)
  160. coroutine.resume(coroutine.create(function()
  161. while wait() do
  162. vehseat.CFrame = Workspace.plane.CFrame
  163. vehseat.Anchored = true
  164. end
  165. end))]]
  166.  
  167.  
  168.  
  169. mouse.KeyDown:connect(function(key)
  170. key = key:lower()
  171. if key == "f" then
  172. local ray = Ray.new(plane.CFrame.p, (mouse.Hit.p - plane.CFrame.p).unit * 300)
  173. local part, position = workspace:FindPartOnRay(ray,char, false, true)
  174. local beam = Instance.new("Part", workspace)
  175. beam.BrickColor = BrickColor.new("Bright red")
  176. beam.FormFactor = "Custom"
  177. beam.Material = "Neon"
  178. beam.Transparency = 0
  179. beam.Anchored = true
  180. beam.Locked = true
  181. beam.CanCollide = false
  182.  
  183. local distance = (plane.CFrame.p - position).magnitude
  184. beam.Size = Vector3.new(0.2, 0.2, distance)
  185. beam.CFrame = CFrame.new(plane.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  186.  
  187. game:GetService("Debris"):AddItem(beam, 0.3)
  188. if part then
  189. local humanoid = part.Parent:FindFirstChild("Humanoid")
  190.  
  191. if not humanoid then
  192. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  193. local new_sound = Instance.new('Sound',plane)
  194. new_sound.SoundId = "rbxassetid://180204650"
  195. new_sound.Parent = plane
  196. new_sound.Volume = 1
  197. new_sound:Play()
  198. new_sound:Stop()
  199. end
  200.  
  201. if humanoid then
  202. local new_sound = Instance.new('Sound',plane)
  203. new_sound.SoundId = "rbxassetid://180204650"
  204. new_sound.Parent = plane
  205. new_sound.Volume = 1
  206. new_sound:Play()
  207. new_sound:Stop()
  208. humanoid:TakeDamage(30)
  209. local GrenadeBLOCK = Instance.new('Part',workspace)
  210. GrenadeBLOCK.CFrame = mouse.Hit
  211. GrenadeBLOCK.Transparency = 1
  212. local Grenade = Instance.new('Explosion',workspace)
  213. Grenade.Position = GrenadeBLOCK.Position
  214. Grenade.BlastRadius = 2
  215. GrenadeBLOCK:Remove()
  216.  
  217.  
  218. end
  219. end
  220. wait(0.3)
  221. local ray = Ray.new(plane.CFrame.p, (mouse.Hit.p - plane.CFrame.p).unit * 300)
  222. local part, position = workspace:FindPartOnRay(ray,char, false, true)
  223. local beam = Instance.new("Part", workspace)
  224. beam.BrickColor = BrickColor.new("Bright red")
  225. beam.FormFactor = "Custom"
  226. beam.Material = "Neon"
  227. beam.Transparency = 0
  228. beam.Anchored = true
  229. beam.Locked = true
  230. beam.CanCollide = false
  231.  
  232. local distance = (plane.CFrame.p - position).magnitude
  233. beam.Size = Vector3.new(0.2, 0.2, distance)
  234. beam.CFrame = CFrame.new(plane.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  235.  
  236. game:GetService("Debris"):AddItem(beam, 0.3)
  237. if part then
  238. local humanoid = part.Parent:FindFirstChild("Humanoid")
  239.  
  240. if not humanoid then
  241. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  242. local new_sound = Instance.new('Sound',plane)
  243. new_sound.SoundId = "rbxassetid://180204650"
  244. new_sound.Parent = plane
  245. new_sound.Looped=true
  246. new_sound.Volume = 1
  247. new_sound:Play()
  248. new_sound:Stop()
  249. end
  250.  
  251. if humanoid then
  252. local new_sound = Instance.new('Sound',plane)
  253. new_sound.SoundId = "rbxassetid://180204650"
  254. new_sound.Parent = plane
  255. new_sound.Looped=true
  256. new_sound.Volume = 1
  257. new_sound:Play()
  258. new_sound:Stop()
  259. humanoid:TakeDamage(30)
  260. local GrenadeBLOCK = Instance.new('Part',workspace)
  261. GrenadeBLOCK.CFrame = mouse.Hit
  262. GrenadeBLOCK.Transparency = 1
  263. local Grenade = Instance.new('Explosion',workspace)
  264. Grenade.Position = GrenadeBLOCK.Position
  265. Grenade.BlastRadius = 2
  266. GrenadeBLOCK:Remove()
  267.  
  268.  
  269. end
  270. end
  271.  
  272. end
  273. end)
  274.  
  275.  
  276. mouse.KeyDown:connect(function(key)
  277. key = key:lower()
  278. if key == "r" then
  279. local new_sound = Instance.new('Sound',plane)
  280. new_sound.SoundId = "rbxassetid://152400962"
  281. new_sound:Play()
  282. new_sound.Volume = .4
  283. end
  284. end)
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291. mouse.KeyDown:connect(function(key)
  292. key = key:lower()
  293. if key == "e" then
  294.  
  295. local gui = Instance.new("BillboardGui", nums)
  296. gui.Parent=nums
  297. gui.AlwaysOnTop = true
  298. gui.Adornee=nums
  299. gui.Size=UDim2.new(3,0,3,0)
  300. gui.StudsOffset=Vector3.new(0.4,-.5,0)
  301. text=Instance.new("ImageLabel")
  302. text.Image = "http://www.roblox.com/asset/?id=142406345"
  303. text.Size=UDim2.new(1,0,1,0)
  304. text.Position=UDim2.new(-0.125,0,-0.25,0)
  305. text.BackgroundTransparency = 1
  306. text.Parent=gui
  307.  
  308. game:GetService('Players').PlayerAdded:connect(function(player)
  309. player.CharacterAdded:connect(function(character)
  310. character:WaitForChild("Humanoid").Died:connect(function()
  311. pcall(function() game:service("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="[Plane] Target: Destoyed"}) end)
  312. end)
  313. end)
  314. end)
  315. end
  316. end)
  317.  
  318. game:GetService('Players').PlayerAdded:connect(function(player)
  319. player.CharacterAdded:connect(function(character)
  320. character:WaitForChild("Humanoid").Died:connect(function()
  321. pcall(function() game:service("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="[Plane] Target: Destoyed"}) end)
  322. end)
  323. end)
  324. end)
  325.  
  326. mouse.KeyDown:connect(function(key)
  327. key = key:lower()
  328. if key == "l" then
  329. hold = false
  330. workspace.CurrentCamera.CameraSubject = char.Humanoid
  331. plane:Destroy()
  332. end
  333. end)
  334.  
  335. mouse.KeyDown:connect(function(key)
  336. key = key:lower()
  337. if key == "w" then
  338. function Loop1()
  339. while true and wait() do
  340. plane.CFrame = plane.CFrame * CFrame.new(0,0,-.8)
  341. end
  342. end
  343. my_first_coroutine = coroutine.create(Loop1)
  344. coroutine.resume(my_first_coroutine)
  345.  
  346. function Loop2()
  347. while true and wait() do
  348. plane.CFrame = plane.CFrame * CFrame.new(0,0,-.8)
  349. end
  350. end
  351. end
  352. end)
  353.  
  354.  
  355.  
  356. mouse.KeyDown:connect(function(key)
  357. key = key:lower()
  358. if key == "s" then
  359. function Loop1()
  360. while true and wait() do
  361. plane.CFrame = plane.CFrame * CFrame.new(0,0,.4)
  362. end
  363. end
  364. my_first_coroutine = coroutine.create(Loop1)
  365. coroutine.resume(my_first_coroutine)
  366.  
  367. function Loop2()
  368. while true and wait() do
  369. plane.CFrame = plane.CFrame * CFrame.new(0,0,.4)
  370. end
  371. end
  372. end
  373. end)
  374.  
  375.  
  376. --Partical gun
  377.  
  378. local new=Instance.new
  379. local rad=math.rad
  380. local cf=CFrame.new
  381. local v3=Vector3.new
  382. local ang=function(x,y,z)
  383. return CFrame.Angles(rad(x),rad(y),rad(z))
  384. end
  385. local player=owner
  386. local char=player.Character
  387. local cam=workspace.Camera
  388. local weld=function(a,b,c0,c1)
  389. m=Instance.new('Motor',a)
  390. m.Part0=a
  391. m.Part1=b
  392. m.C0=c0
  393. m.C1=c1
  394. return m
  395. end
  396.  
  397. snd='rbxassetid://--247600043'
  398. beamm=Instance.new('Model',workspace)
  399. beamm.Name='beam'
  400.  
  401. laser=false
  402.  
  403. rs=Instance.new('Part',char)
  404. rs.Transparency=1
  405. rs.CanCollide=false
  406. rs.TopSurface,rs.BottomSurface=0,0
  407. rs.FormFactor=3
  408. rs.Size=Vector3.new(.5,.5,.5)
  409.  
  410. ls=rs:Clone()
  411. ls.Parent=char
  412.  
  413. rsw=weld(rs,char.Torso,cf(-1,-.5,0),cf())
  414. lsw=weld(ls,char.Torso,cf(1,-.5,0),cf())
  415. raw=weld(char['Right Arm'],rs,cf(-.5,.6,-.14),ang(90,0,-8))
  416. law=weld(char['Left Arm'],ls,cf(-.3,1.5,-.14),ang(90,0,43))
  417.  
  418. s1=Instance.new('Sound',char)
  419. s1.Volume=1
  420. s1.Pitch=1.2
  421. s1.Looped=true
  422. s1.SoundId=snd
  423.  
  424. particles={}
  425.  
  426. local wep=new('Part',char)
  427. wep.FormFactor=3
  428. wep.CanCollide=false
  429. wep.Size=v3(1,3,1)
  430. wep.TopSurface,wep.BottomSurface=0,0
  431. wep.Transparency=1
  432. local wepw=weld(wep,char['Right Arm'],cf(.26,.4,.7),ang(0,0,8))
  433.  
  434. local beam=wep:Clone()
  435. beam:ClearAllChildren()
  436. beam.Material='Neon'
  437. beam.BrickColor=BrickColor.new('Really red')
  438. beam.Size=Vector3.new(3,3,1)
  439. beam.Transparency=.5
  440. beam.Anchored=true
  441. local ms=Instance.new('BlockMesh',beam)
  442. local inner=beam:Clone()
  443. inner.Transparency=0
  444. inner.Material='SmoothPlastic'
  445. inner.BrickColor=BrickColor.new('Really black')
  446. local ms2=inner.Mesh
  447.  
  448. local expl=inner:Clone()
  449. expl.Mesh:Destroy()
  450. expl.Material='Neon'
  451. expl.BrickColor=BrickColor.new('Really red')
  452. expl.Size=Vector3.new(11,11,11)
  453. expl.Transparency=.55
  454. pl=Instance.new('PointLight',expl)
  455. pl.Color=expl.BrickColor.Color
  456. pl.Range=pl.Range*2
  457. pl.Name='light'
  458. local br=pl.Range
  459.  
  460. local exa=expl:Clone()
  461. exa.Size=Vector3.new(.4,.4,.4)
  462. pl2=exa.light
  463.  
  464. local part=exa:Clone()
  465. part.Size=Vector3.new(1.5,1.5,1.5)
  466. pl3=part.light
  467. pms=Instance.new('BlockMesh',part)
  468.  
  469. char.Humanoid.Died:connect(function()
  470. laser=false
  471. beam.Parent=nil
  472. inner.Parent=nil
  473. expl.Parent=nil
  474. exa.Parent=nil
  475. s1:stop()
  476. end)
  477.  
  478. mouse.KeyDown:connect(function(key)
  479. key = key:lower()
  480. if key == "g" then
  481. laser=true
  482. s1.Volume=1
  483. s1:play()
  484. end end)
  485. mouse.KeyDown:connect(function(key)
  486. key = key:lower()
  487. if key == "k" then
  488. laser=false
  489. beam.Parent=nil
  490. inner.Parent=nil
  491. expl.Parent=nil
  492. exa.Parent=nil
  493. s1:stop()
  494. end end)
  495.  
  496. parti=0
  497. game:service'RunService'.Stepped:connect(function()
  498. parti=parti+1
  499. for i,v in pairs(particles) do
  500. v.CFrame=v.CFrame*CFrame.new(0,0,-.1)
  501. v.Transparency=1
  502. v.BrickColor=BrickColor.new(Color3.new(math.random(),math.random(),math.random()))
  503. if v.Transparency >= 1 then
  504. v:Destroy()
  505. table.remove(particles,i)
  506. else
  507. v.Parent=beamm
  508. end
  509. end
  510. a=cam.CoordinateFrame.p
  511. b=mouse.Hit.p
  512. mhitr=Ray.new(a,(b-a).unit*999)
  513. mhit,ps=workspace:FindPartOnRayWithIgnoreList(mhitr,{char,beamm})
  514. raw.C1=ang(90+(mouse.Hit.lookVector.y*90),0,-8)
  515.  
  516. if not char.Humanoid.Sit and not char.Humanoid.PlatformStand then
  517. char.Torso.CFrame=CFrame.new(char.Torso.CFrame.p,Vector3.new(ps.x,char.Torso.CFrame.p.y,ps.z))
  518. end
  519. if laser then
  520. beamm.Parent=workspace
  521. beam.Parent=beamm
  522. inner.Parent=beamm
  523. expl.Parent=beamm
  524. exa.Parent=beamm
  525.  
  526. ray=Ray.new((plane.CFrame*cf(0,-1.5,0)).p,((plane.CFrame*cf(0,-10,0)).p-(plane.CFrame*cf(0,-1.5,0)).p).unit*999)
  527. hit,pos=workspace:FindPartOnRayWithIgnoreList(ray,{char,beamm})
  528.  
  529. if hit and hit.Parent:findFirstChild('Humanoid') and s1.Volume > .3 and parti/8==math.floor(parti/8) then
  530. Instance.new('Explosion',workspace).Position=pos
  531. end
  532. if hit and hit.Parent==workspace.Terrain or hit==workspace.Terrain and parti/8==math.floor(parti/8) then
  533. e=Instance.new('Explosion',workspace)
  534. e.Position=pos
  535. e.BlastRadius=14
  536. e.BlastPressure=1e4
  537. end
  538. if hit and not hit.Anchored and not (hit:GetMass()>1e4) then
  539. hit.Velocity=hit.Velocity+beam.CFrame.lookVector*(1*s1.Volume*hit:GetMass())
  540. end
  541.  
  542. if parti==math.floor(parti) then
  543. par=part:Clone()
  544. table.insert(particles,par)
  545. par.Parent=beamm
  546. par.Transparency=11111
  547. par.CFrame=cf(pos)*ang(math.random(-180,180),math.random(-180,180),math.random(-180,180))*cf(0,0,-10)
  548. end
  549.  
  550. mag=((plane.CFrame*cf(0,-1.5,0)).p-pos).magnitude
  551. ms.Scale=v3(s1.Volume,s1.Volume,mag)
  552. ms2.Scale=v3(ms.Scale.x/2,ms.Scale.y/2,mag-(.1/mag))
  553. beam.CFrame=cf((plane.CFrame*cf(0,-1.5,0)).p,pos)*cf(0,0,-mag/2)*ang(0,0,math.random(0,180))
  554. inner.CFrame=beam.CFrame
  555. expl.Size=v3(math.random(9,13),math.random(9,13),math.random(9,13))*s1.Volume
  556. expl.Transparency=.2
  557. expl.CFrame=cf(pos)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  558. exa.Size=v3(.4,.4,.4)*s1.Volume
  559. exa.CFrame=plane.CFrame*cf(0,-1.5,0)*ang(math.random(0,180),math.random(0,180),math.random(0,180))
  560. end
  561. end)
  562.  
  563.  
  564.  
  565.  
  566.  
  567. bill2 = Instance.new("BillboardGui", nums)
  568. bill2.Size = UDim2.new(4, 4, 4, 4)
  569. bill2.AlwaysOnTop = false
  570. label = Instance.new("TextLabel", bill2)
  571. label.Size = UDim2.new(1,2,1,2)
  572. label.Position = UDim2.new(0, 0, -.65, 0)
  573. label.TextColor3 = Color3.new(255, 0, 255)
  574. label.TextStrokeTransparency = 0
  575. label.TextStrokeColor3 = Color3.new(255, 255, 255)
  576. label.BackgroundTransparency = 1
  577. label.Visible = true
  578. label.Font = 'SourceSansBold'
  579. label.FontSize = 'Size36'
  580. label.Text = "Target"
Advertisement
Add Comment
Please, Sign In to add comment