SyntaxIsHere

Untitled

Nov 11th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.00 KB | None | 0 0
  1. --Made by OpTic Wisdom/LikeATrollFace
  2.  
  3. --https://github.com/Mokiros/roblox-FE-compatibility
  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. local RealPlayer = Player
  7. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  8.  
  9. game:GetObjects("rbxassetid://501559112")[1].Parent=game.Workspace
  10. wait(0.5)
  11. game.Workspace.Towers:MoveTo(game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector* 30)
  12. wait(2)
  13. x = game:GetService("InsertService"):LoadAsset(163348575)
  14. for i,v in pairs(x:GetChildren()) do
  15. v.Parent = game.Players.LocalPlayer.Backpack
  16. end
  17.  
  18. Instance.new("ForceField" ,game.Players.LocalPlayer.Character)
  19.  
  20. kek = game.Players.LocalPlayer.Name
  21.  
  22. local children = game.Workspace.Towers.Tower2:GetChildren()
  23. for _, child in pairs(children) do
  24. for _, child in pairs(child:GetChildren()) do
  25. table.insert(children, child)
  26. end
  27.  
  28. if child:IsA("BasePart") then
  29.  
  30.  
  31. local function handleTouch(otherPart)
  32. local character = otherPart.Parent
  33. local humanoid = character:FindFirstChild(kek.."'s Plane")
  34. if humanoid then
  35. child.Anchored = false
  36. fire2 = Instance.new("Fire")
  37. fire2.Parent = child
  38. explo1 = Instance.new("Explosion")
  39. explo1.Parent = child
  40. explo1.BlastPressure = 10
  41. explo1.Position = child.Position
  42. end
  43. end
  44.  
  45. child.Touched:connect(handleTouch)
  46. end
  47. end
  48.  
  49. local children = game.Workspace.Towers.Tower1:GetChildren()
  50. for _, child in pairs(children) do
  51. for _, child in pairs(child:GetChildren()) do
  52. table.insert(children, child)
  53. end
  54.  
  55. if child:IsA("BasePart") then
  56.  
  57.  
  58. local function handleTouch(otherPart)
  59. local character = otherPart.Parent
  60. local humanoid = character:FindFirstChild(kek.."'s Plane")
  61. if humanoid then
  62. child.Anchored = false
  63. fire1 = Instance.new("Fire")
  64. fire1.Parent = child
  65. explo2 = Instance.new("Explosion")
  66. explo2.Parent = child
  67. explo2.BlastPressure = 10
  68. explo2.Position = child.Position
  69. end
  70. end
  71.  
  72. child.Touched:connect(handleTouch)
  73. end
  74. end
Add Comment
Please, Sign In to add comment