sawgamer1

Untitled

May 20th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.43 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6.  
  7. --Converted with ttyyuu12345's model to script plugin v4
  8. function sandbox(var,func)
  9. local env = getfenv(func)
  10. local newenv = setmetatable({},{
  11. __index = function(self,k)
  12. if k=="script" then
  13. return var
  14. else
  15. return env[k]
  16. end
  17. end,
  18. })
  19. setfenv(func,newenv)
  20. return func
  21. end
  22. cors = {}
  23. mas = Instance.new("Model",game:GetService("Lighting"))
  24. Tool0 = Instance.new("Tool")
  25. Part1 = Instance.new("Part")
  26. Part2 = Instance.new("Part")
  27. PointLight3 = Instance.new("PointLight")
  28. Sparkles4 = Instance.new("Sparkles")
  29. WeldConstraint5 = Instance.new("WeldConstraint")
  30. Script6 = Instance.new("Script")
  31. LocalScript7 = Instance.new("LocalScript")
  32. Tool0.Name = "SMITE WAND"
  33. Tool0.Parent = mas
  34. Tool0.Grip = CFrame.new(0, -1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  35. Tool0.GripPos = Vector3.new(0, -1.5, 0)
  36. Part1.Name = "Handle"
  37. Part1.Parent = Tool0
  38. Part1.CFrame = CFrame.new(-10.3500004, -6.04999876, 16.1999989, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  39. Part1.Position = Vector3.new(-10.3500004, -6.04999876, 16.1999989)
  40. Part1.Color = Color3.new(0.501961, 0.733333, 0.858824)
  41. Part1.Size = Vector3.new(0.300000012, 2.89999938, 0.299999923)
  42. Part1.BottomSurface = Enum.SurfaceType.Smooth
  43. Part1.BrickColor = BrickColor.new("Pastel Blue")
  44. Part1.Material = Enum.Material.DiamondPlate
  45. Part1.TopSurface = Enum.SurfaceType.Smooth
  46. Part1.brickColor = BrickColor.new("Pastel Blue")
  47. Part2.Parent = Tool0
  48. Part2.CFrame = CFrame.new(-10.3500004, -4.45000029, 16.2000008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  49. Part2.Position = Vector3.new(-10.3500004, -4.45000029, 16.2000008)
  50. Part2.Color = Color3.new(0.972549, 0.972549, 0.972549)
  51. Part2.Size = Vector3.new(0.300000012, 0.299999833, 0.300000012)
  52. Part2.BottomSurface = Enum.SurfaceType.Smooth
  53. Part2.BrickColor = BrickColor.new("Institutional white")
  54. Part2.Material = Enum.Material.Neon
  55. Part2.TopSurface = Enum.SurfaceType.Smooth
  56. Part2.brickColor = BrickColor.new("Institutional white")
  57. PointLight3.Parent = Part2
  58. Sparkles4.Parent = Part2
  59. Sparkles4.Color = Color3.new(1.77083, 10.2, 1)
  60. Sparkles4.SparkleColor = Color3.new(1, 1, 1)
  61. WeldConstraint5.Parent = Tool0
  62. WeldConstraint5.Part0 = Part2
  63. WeldConstraint5.Part1 = Part1
  64. Script6.Parent = Tool0
  65. table.insert(cors,sandbox(Script6,function()
  66. local tool = script.Parent
  67. local sound = workspace["Lightning Strike"]
  68.  
  69. local remoteEvent = Instance.new("RemoteEvent", tool)
  70. remoteEvent.Name = "MouseLocation"
  71.  
  72. local money = game.ServerStorage.Lightning
  73.  
  74. local function spawnMoney(player, mousePos)
  75. local boomboom = Instance.new("Explosion")
  76. sound:Play()
  77. sound.TimePosition = 0.5
  78. local cash = money:clone()
  79. boomboom.Parent = workspace
  80. boomboom.Position = mousePos.Position
  81. cash.Parent = workspace
  82. cash.Position = mousePos.Position
  83. end
  84.  
  85. remoteEvent.OnServerEvent:Connect(spawnMoney)
  86. end))
  87. LocalScript7.Parent = Tool0
  88. table.insert(cors,sandbox(LocalScript7,function()
  89. local tool = script.Parent
  90. local remoteEvent = tool:WaitForChild("MouseLocation")
  91. local mouse = game.Players.LocalPlayer:GetMouse()
  92.  
  93. local function remoteSend()
  94. remoteEvent:FireServer(mouse.Hit)
  95. end
  96.  
  97. tool.Activated:Connect(remoteSend)
  98. end))
  99. for i,v in pairs(mas:GetChildren()) do
  100. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  101. pcall(function() v:MakeJoints() end)
  102. end
  103. mas:Destroy()
  104. for i,v in pairs(cors) do
  105. spawn(function()
  106. pcall(v)
  107. end)
  108. end
Advertisement
Add Comment
Please, Sign In to add comment