Advertisement
lafur

Untitled

Dec 28th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. 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 Player = game.Players.LocalPlayer
  6. Character = Player.Character
  7. script.Parent = Character
  8.  
  9. --[[ * Fire StickA * ]]--
  10.  
  11. pcall(function() Character.Staff:Remove() end)
  12.  
  13. Staff = Instance.new("Model")
  14. Staff.Name = "Staff"
  15. Staff.Parent = Character
  16.  
  17. Lightning = Instance.new("Model")
  18. Lightning.Name = "Lightning"
  19. Lightning.Parent = Staff
  20.  
  21. --[[ * Arm Weld * ]]--
  22.  
  23. ArmWeld = Instance.new("Weld")
  24. ArmWeld.Parent = Character["Torso"]
  25. ArmWeld.Part0 = ArmWeld.Parent
  26. ArmWeld.Part1 = Character["Right Arm"]
  27. ArmWeld.C0 = CFrame.new(1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  28.  
  29. --[[ * Arm Weld * ]]--
  30.  
  31. ArmWeldR = Instance.new("Weld")
  32. ArmWeldR.Parent = Character["Torso"]
  33. ArmWeldR.Part0 = ArmWeldR.Parent
  34. ArmWeldR.Part1 = Character["Left Arm"]
  35. ArmWeldR.C0 = CFrame.new(-1.5,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  36.  
  37. --[[ * Neck Weld * ]]--
  38.  
  39. Neck = Instance.new("Weld")
  40. Neck.Parent = Character["Torso"]
  41. Neck.Part0 = Neck.Parent
  42. Neck.Part1 = Character["Head"]
  43. Neck.C0 = CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  44.  
  45. --[[ * StickA * ]]--
  46.  
  47. StickA = Instance.new("Part")
  48. StickA.formFactor = "Custom"
  49. StickA.Locked = true
  50. StickA.CanCollide = false
  51. StickA.BrickColor = BrickColor.new("Navy blue")
  52. StickA.Reflectance = 1
  53. StickA.Anchored = false
  54. StickA.Size = Vector3.new(1,1,1)
  55. StickA.TopSurface = 0
  56. StickA.BottomSurface = 0
  57. StickA.Parent = Staff
  58. MeshA = Instance.new("SpecialMesh",StickA)
  59. MeshA.MeshType = "Sphere"
  60. WeldA = Instance.new("Weld")
  61. WeldA.Parent = StickA
  62. WeldA.Part0 = Character["Right Arm"]
  63. WeldA.Part1 = StickA
  64. WeldA.C0 = CFrame.new(0,-1,-0) * CFrame.Angles(-math.pi/2,0,0)
  65. GyroA = Instance.new("BodyGyro",Character.Torso)
  66. GyroA.maxTorque = Vector3.new(0,0,0)
  67. GyroA.P = GyroA.P*10
  68. VelA = Instance.new("BodyVelocity",Character.Torso)
  69. VelA.P = VelA.P*2
  70. VelA.maxForce = Vector3.new(0,0,0)
  71. SpaB = Instance.new("Sparkles",StickA)
  72. SpaB.Enabled = false
  73. --[[ * Spark * ]]--
  74.  
  75. function spark(A,B)
  76. Hit = A.CFrame
  77. local P = Instance.new("Part")
  78. P.Name = "Guideline"
  79. local Place0 = B.CFrame
  80. P.formFactor = 0
  81. P.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  82. P.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  83. P.Parent = Lightning
  84. P.BrickColor = BrickColor.Black()
  85. P.Anchored = true
  86. P.CanCollide = false
  87. P.Transparency = 1
  88. m = Instance.new("BlockMesh")
  89. m.Scale = Vector3.new(0.1,0.1,1)
  90. m.Parent = P
  91. mh = A.CFrame
  92. for c1 = 1, 1 do
  93. oldHit = B.CFrame
  94. for count = 1, 10 do
  95. val1 = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))
  96. val2 = P.Size.z / 10
  97. val3 = P.CFrame.lookVector * -1
  98. val4 = count * val2
  99. val5 = val4 * val3
  100. val6 = B.CFrame.p
  101. Hit = CFrame.new(val5 + val1 + val6)
  102. local s = Instance.new("Part")
  103. s.Name = "Spark"
  104. local Place0 = oldHit
  105. s.formFactor = 0
  106. s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  107. s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  108. s.Parent = Lightning
  109. s.BrickColor = BrickColor.White()
  110. s.Anchored = true
  111. s.CanCollide = false
  112. m = Instance.new("BlockMesh")
  113. m.Scale = Vector3.new(0.1,0.1,1)
  114. m.Parent = s
  115. clone = s:clone()
  116. clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1)
  117. clone.BrickColor = BrickColor.Blue()
  118. clone.Transparency = 0.8
  119. clone.Parent = s.Parent
  120. oldHit = Hit
  121. end
  122. Hit = oldHit
  123. local s = Instance.new("Part")
  124. s.Name = "Spark"
  125. local Place0 = mh
  126. s.formFactor = 0
  127. s.Size = Vector3.new(1,1,(Place0.p - Hit.p).magnitude)
  128. s.CFrame = CFrame.new((Place0.p + Hit.p)/2,Place0.p)
  129. s.Parent = Lightning
  130. s.BrickColor = BrickColor.White()
  131. s.Anchored = true
  132. s.CanCollide = false
  133. m = Instance.new("BlockMesh")
  134. m.Scale = Vector3.new(0.1,0.1,1)
  135. m.Parent = s
  136. clone = s:clone()
  137. clone.Mesh.Scale = Vector3.new(0.3,0.3,1.1)
  138. clone.BrickColor = BrickColor.Blue()
  139. clone.Transparency = 0.8
  140. clone.Parent = s.Parent
  141. wait(0.5)
  142. end
  143. P:remove()
  144. end
  145.  
  146. function PlaceL(BB)
  147. coroutine.resume(coroutine.create(function()
  148. local PA = Instance.new("Part")
  149. PA.Anchored = true
  150. PA.Locked = true
  151. PA.CanCollide = false
  152. PA.Transparency = 1
  153. PA.Size = Vector3.new(0.1,0.1,0.1)
  154. PA.Parent = Lightning
  155. PA.CFrame = CFrame.new(BB.x,BB.y,BB.z)
  156. spark(StickA,PA)
  157. for i = 1,10 do wait()
  158. for i,v in pairs(Lightning:GetChildren()) do
  159. if v:IsA("Part") then
  160. v.Transparency = v.Transparency + 0.1
  161. end
  162. end
  163. end
  164. for i,v in pairs(Lightning:GetChildren()) do
  165. if v:IsA("Part") then
  166. v:Remove()
  167. end
  168. end
  169. end))
  170. end
  171.  
  172. --[[ * Tool * ]]--
  173.  
  174. if script.Parent.Name == Player.Name then
  175. Hopper = Instance.new("HopperBin")
  176. Hopper.Name = "Staff"
  177. Hopper.Parent = Player.Backpack
  178. end
  179.  
  180. Blah = true
  181. StaffOn = false
  182. StaffStuff = false
  183. Flying = false
  184. Lighter = false
  185.  
  186. function Clicked(Mouse)
  187. if Blah == true then
  188. Blah = false
  189.  
  190. Blah = true
  191. end
  192. end
  193.  
  194. VCZ = 1
  195.  
  196. Keys = {"/","0","f"}
  197. PGyro = nil
  198. Asin = false
  199.  
  200. function onKeyDown(key,Mouse)
  201. if Blah == true then
  202. Blah = false
  203.  
  204. if key == "f" then
  205. if Lighter == false then
  206. Keys[key] = true
  207. Lighter = true
  208.  
  209. SpaB.Enabled = true
  210. while Keys[key] == true and Lighter == true do
  211. --PlaceL(Vector3.new(Character.Torso.Position.x,Character.Torso.Position.y+100,Character.Torso.Position.z))
  212. if Mouse.Target ~= nil then
  213. PlaceL(Mouse.Hit.p)
  214. Mouse.Target:BreakJoints()
  215. end
  216. wait()
  217. end
  218. end
  219. end
  220.  
  221. Blah = true
  222. return
  223. end
  224. end
  225.  
  226. function onKeyUp(key,Mouse)
  227.  
  228. if key == "f" then
  229. if Lighter == true and Keys[key] == true then
  230. Keys[key] = false
  231. Lighter = false
  232. SpaB.Enabled = false
  233. wait(1)
  234. SpaB.Enabled = false
  235. end
  236. end
  237.  
  238. end
  239.  
  240. function Selected(Mouse)
  241. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  242. Mouse.KeyDown:connect(function(key) onKeyDown(key, Mouse) end)
  243. Mouse.KeyUp:connect(function(key) onKeyUp(key, Mouse) end)
  244. Mouse.Button1Down:connect(function()Clicked(Mouse)end)
  245. for i = 1,10 do wait()
  246. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(math.pi/10/2,0,0)
  247. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0,-0.05,0.05)
  248. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(math.pi/10/2,0,0)
  249. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(0,-0.05,0.05)
  250. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,0,math.pi/10/2)
  251. end
  252. for i = 1,10 do wait()
  253. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,-math.pi/10/2/2)
  254. ArmWeld.C0 = ArmWeld.C0 - Vector3.new(0.05,0,0)
  255. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0,0,math.pi/10/2/2)
  256. ArmWeldR.C0 = ArmWeldR.C0 - Vector3.new(-0.05,0,0)
  257. WeldA.C0 = WeldA.C0 * CFrame.Angles(-math.pi/10/2/2,0,0)
  258. WeldA.C0 = WeldA.C0 + Vector3.new(0,-0.04,0)
  259. MeshA.Scale = MeshA.Scale + Vector3.new(0.05,0.05,0.05)
  260. end
  261. end
  262.  
  263. function Deselected(Mouse)
  264. for i = 1,10 do wait()
  265. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(0,0,math.pi/10/2/2)
  266. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(0.05,0,0)
  267. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(0,0,-math.pi/10/2/2)
  268. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(-0.05,0,0)
  269. WeldA.C0 = WeldA.C0 * CFrame.Angles(math.pi/10/2/2,0,0)
  270. WeldA.C0 = WeldA.C0 - Vector3.new(0,-0.04,0)
  271. MeshA.Scale = MeshA.Scale - Vector3.new(0.05,0.05,0.05)
  272. end
  273. for i = 1,10 do wait()
  274. ArmWeld.C0 = ArmWeld.C0 * CFrame.Angles(-math.pi/10/2,0,0)
  275. ArmWeld.C0 = ArmWeld.C0 + Vector3.new(0,-0.05,0.05)
  276. ArmWeldR.C0 = ArmWeldR.C0 * CFrame.Angles(-math.pi/10/2,0,0)
  277. ArmWeldR.C0 = ArmWeldR.C0 + Vector3.new(0,-0.05,0.05)
  278. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,0,-math.pi/10/2)
  279. end
  280. end
  281.  
  282. function DeadGuy()
  283. --pcall(function() Character.Head.face:Remove() end)
  284. for i = 1,20 do
  285. for i,v in pairs(Character:GetChildren()) do
  286. if v:IsA("Part") then
  287. v.Anchored = true
  288. end
  289. end
  290. for i,v in pairs(Assassin:GetChildren()) do
  291. if v:IsA("Part") then
  292. v.Anchored = true
  293. end
  294. end
  295. for i,v in pairs(Staff:GetChildren()) do
  296. if v:IsA("Part") then
  297. v.Anchored = true
  298. end
  299. end
  300. for i,v in pairs(Lightning:GetChildren()) do
  301. if v:IsA("Part") then
  302. v.Anchored = true
  303. end
  304. end
  305. end
  306. wait(0.1)
  307. end
  308.  
  309. Hopper.Selected:connect(Selected)
  310. Hopper.Deselected:connect(Deselected)
  311. Character.Humanoid.Died:connect(DeadGuy)
  312. --[[
  313.  
  314. for i = 1,20 do wait()
  315. WeldA.C0 = WeldA.C0 * CFrame.Angles(0,0,math.pi/10)
  316. WeldB.C0 = WeldB.C0 + Vector3.new(0,0.1,0)
  317. WeldC.C0 = WeldC.C0 - Vector3.new(0,0.1,0)
  318. end
  319.  
  320. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement