Advertisement
Scripteditor233

h

Jan 19th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.33 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. -- Bullet!Bill --
  152. wait()
  153. LoudVolume = false
  154. Submerged = false
  155. Music = true
  156. script.Name = "BulletBill" -- or Morty.
  157. Player = game.Players.LocalPlayer
  158. c = game.Players.LocalPlayer.Character
  159. Head = c.Head
  160. anim = c.Humanoid.Animator
  161. Humanoid = c:findFirstChild("Humanoid")Humanoid.Name = "InfiniteBeing"
  162. b23 = Instance.new("BoolValue",c)b23.Name = "InfiniteHuman"
  163. rage = false
  164. p = game.Players.LocalPlayer
  165. Music = false
  166.  
  167. local Effects = {}
  168. attack = false
  169. local attacking = false
  170. vt = Vector3.new
  171. bc = BrickColor.new
  172. br = BrickColor.random
  173. it = Instance.new
  174. cf = CFrame.new
  175. euler = CFrame.fromEulerAnglesXYZ
  176. angles = CFrame.Angles
  177. matr = math.random
  178. mouse = Player:GetMouse()
  179.  
  180. RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  181. RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  182. LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  183. LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  184. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  185. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  186. LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  187. LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  188. NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  189. NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  190. RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  191. RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  192. RS = c.Torso:FindFirstChild("Right Shoulder")
  193. LS = c.Torso:FindFirstChild("Left Shoulder")
  194. RH = c.Torso:FindFirstChild("Right Hip")
  195. LH = c.Torso:FindFirstChild("Left Hip")
  196. RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
  197. N = c.Torso:FindFirstChild("Neck")
  198. cf = CFrame.new
  199. ang = CFrame.Angles
  200. rd = math.rad
  201. rd2 = math.random
  202.  
  203.  
  204. function NukeShockwaves(Size, CFramez)
  205. local Shock = Instance.new("Part",game.Workspace)Shock.Transparency = 0.5 Shock.Size = Vector3.new(0.2,0.2,0.2) Shock.Anchored = true
  206. Shock.CanCollide = false Shock.BrickColor = BrickColor.new("Medium stone grey") local SM = Instance.new("SpecialMesh",Shock)
  207. SM.MeshId = "rbxassetid://20329976" SM.Scale = Vector3.new(Size,5,Size) Shock.CFrame = CFramez*CFrame.new(0,1,0)*CFrame.Angles(0,math.rad(math.random(-360,360)),0)
  208. Spawn(function()
  209. for i = 1,math.huge do
  210. if Shock.Transparency >= 1 then break end
  211. Shock.Transparency = Shock.Transparency + 0.025
  212. wait()
  213. end
  214. end)
  215. end
  216.  
  217. function swait(num)
  218. if num==0 or num==nil then
  219. game:service'RunService'.Heartbeat:wait(0)
  220. else
  221. for i=0,num do
  222. game:service'RunService'.Heartbeat:wait(0)
  223. end
  224. end
  225. end
  226. for i,v in pairs (c:children()) do
  227. if v.ClassName == "Accessory" then
  228. for i,v2 in pairs (v:children()) do
  229. if v2.ClassName == "Part" then
  230. v2.Transparency = 1
  231. end
  232. end
  233. end
  234. if v.ClassName == "Part" then
  235. v.Transparency = 1
  236. end
  237. end
  238. c.HumanoidRootPart.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,3,0)
  239. local P = Instance.new("Part",c)P.Size = Vector3.new(3,3,3)local W = Instance.new("Weld",c.HumanoidRootPart)W.Part0 = c.HumanoidRootPart W.Part1 = P
  240. W.C0 = CFrame.Angles(0,math.rad(90),0) local SM = Instance.new("SpecialMesh",P)SM.MeshId = "rbxassetid://431159713" SM.TextureId = "rbxassetid://431159716" SM.Scale = Vector3.new(0.005,0.005,0.005)
  241. W.C0 = W.C0*CFrame.Angles(math.rad(-90),0,0)local Par = Instance.new("ParticleEmitter",P)Par.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,3,0),NumberSequenceKeypoint.new(1,0,0)})
  242. Par.Speed = NumberRange.new(0)Par.Rate = 250 Par.Lifetime = NumberRange.new(0.25,0.5)
  243. s = Instance.new("Sound",P) s.SoundId = "rbxassetid://273108936" s.Volume = 0.5 s.Looped = true s:Play()
  244. Hit = false
  245. P.Touched:connect(function(Hit)
  246. if Hit == false then return end
  247. if Hit == c or Hit.Parent == c then return end
  248. for i,v in pairs(game.Workspace:children()) do
  249. if v:findFirstChild("Head")~= nil and v ~= c then
  250. if (v.Head.Position-c.HumanoidRootPart.Position).magnitude <= 25 then
  251. v:remove()
  252. end
  253. end
  254. end
  255. Hit = true c.Parent = nil
  256. local Shock = Instance.new("Part",game.Workspace)Shock.Transparency = 0 Shock.Size = Vector3.new(1,1,1) Shock.Anchored = true
  257. Shock.CanCollide = false Shock.BrickColor = BrickColor.new("Bright orange") Shock.Material = "Neon" local SM = Instance.new("SpecialMesh",Shock)
  258. Shock.CFrame = CFrame.new(P.Position) SM.MeshType = "Sphere"
  259. P:remove()
  260. local Pos = Shock.Position
  261. local Sound = Instance.new("Sound",Shock) Sound.SoundId = "rbxassetid://258057783" Sound.Volume = 4 Sound.Parent = Shock Sound.PlaybackSpeed = 0.4 Sound:Play()
  262. for i = 1,4 do
  263. SM.Scale = SM.Scale + Vector3.new(i*2,i*2,i*2)
  264. NukeShockwaves(i*6,CFrame.new(Shock.Position))
  265. wait()
  266. end
  267. for i = 1,30 do
  268. Shock.Transparency = Shock.Transparency + 1/30
  269. SM.Scale = SM.Scale + Vector3.new(i*0.025,i*0.025,i*0.025)
  270. wait()
  271. end
  272. end)
  273.  
  274. Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  275. if hit.Parent==nil then
  276. return
  277. end
  278. local h=hit.Parent:FindFirstChild("Humanoid")
  279. for _,v in pairs(hit.Parent:children()) do
  280. if v:IsA("Humanoid") then
  281. h=v
  282. end
  283. end
  284. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  285. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  286. end
  287. if hit.Parent.className=="Hat" then
  288. hit=hit.Parent.Parent:findFirstChild("Head")
  289. end
  290. if h~=nil and hit.Parent.Name~=c.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  291. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  292. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  293. return
  294. end]]
  295. -- hs(hit,1.2)
  296. local c=Instance.new("ObjectValue")
  297. c.Name="creator"
  298. c.Value=game:service("Players").LocalPlayer
  299. c.Parent=h
  300. game:GetService("Debris"):AddItem(c,.5)
  301. local Damage=math.random(minim,maxim)
  302. -- h:TakeDamage(Damage)
  303. local blocked=false
  304. local block=hit.Parent:findFirstChild("Block")
  305. if block~=nil then
  306. print(block.className)
  307. if block.className=="NumberValue" then
  308. if block.Value>0 then
  309. blocked=true
  310. if decreaseblock==nil then
  311. block.Value=block.Value-1
  312. end
  313. end
  314. end
  315. if block.className=="IntValue" then
  316. if block.Value>0 then
  317. blocked=true
  318. if decreaseblock~=nil then
  319. block.Value=block.Value-1
  320. end
  321. end
  322. end
  323. end
  324. if blocked==false then
  325. -- h:TakeDamage(Damage)
  326. h.Health=h.Health-Damage
  327. else
  328. h.Health=h.Health-(Damage/2)
  329. end
  330. if Type=="Knockdown" then
  331. local hum=hit.Parent.Humanoid
  332. hum.PlatformStand=true
  333. coroutine.resume(coroutine.create(function(HHumanoid)
  334. swait(1)
  335. HHumanoid.PlatformStand=false
  336. end),hum)
  337. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  338. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  339. local bodvol=Instance.new("BodyVelocity")
  340. bodvol.velocity=angle*knockback
  341. bodvol.P=5000
  342. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  343. bodvol.Parent=hit
  344. local rl=Instance.new("BodyAngularVelocity")
  345. rl.P=3000
  346. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  347. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  348. rl.Parent=hit
  349. game:GetService("Debris"):AddItem(bodvol,.5)
  350. game:GetService("Debris"):AddItem(rl,.5)
  351. elseif Type=="Normal" then
  352. local vp=Instance.new("BodyVelocity")
  353. vp.P=500
  354. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  355. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  356. if KnockbackType==1 then
  357. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  358. elseif KnockbackType==2 then
  359. vp.velocity=Property.CFrame.lookVector*knockback
  360. end
  361. if knockback>0 then
  362. vp.Parent=hit.Parent.Torso
  363. end
  364. game:GetService("Debris"):AddItem(vp,.5)
  365. elseif Type=="Up" then
  366. local bodyVelocity=Instance.new("BodyVelocity")
  367. bodyVelocity.velocity=vt(0,60,0)
  368. bodyVelocity.P=5000
  369. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  370. bodyVelocity.Parent=hit
  371. game:GetService("Debris"):AddItem(bodyVelocity,1)
  372. local rl=Instance.new("BodyAngularVelocity")
  373. rl.P=3000
  374. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  375. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  376. rl.Parent=hit
  377. game:GetService("Debris"):AddItem(rl,.5)
  378. elseif Type=="Snare" then
  379. local bp=Instance.new("BodyPosition")
  380. bp.P=2000
  381. bp.D=100
  382. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  383. bp.position=hit.Parent.Torso.Position
  384. bp.Parent=hit.Parent.Torso
  385. game:GetService("Debris"):AddItem(bp,1)
  386. elseif Type=="Target" then
  387. local Targetting = false
  388. if Targetting==false then
  389. ZTarget=hit.Parent.Torso
  390. coroutine.resume(coroutine.create(function(Part)
  391. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  392. swait(5)
  393. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  394. end),ZTarget)
  395. local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  396. local targetgui=Instance.new("BillboardGui")
  397. targetgui.Parent=ZTarget
  398. targetgui.Size=UDim2.new(10,100,10,100)
  399. local targ=Instance.new("ImageLabel")
  400. targ.Parent=targetgui
  401. targ.BackgroundTransparency=1
  402. targ.Image="rbxassetid://4834067"
  403. targ.Size=UDim2.new(1,0,1,0)
  404. cam.CameraType="Scriptable"
  405. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  406. local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  407. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  408. Targetting=true
  409. RocketTarget=ZTarget
  410. for i=1,Property do
  411. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  412. if Humanoid.Health>0 and c.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  413. swait()
  414. end
  415. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  416. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  417. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  418. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  419. end
  420. Targetting=false
  421. RocketTarget=nil
  422. targetgui.Parent=nil
  423. cam.CameraType="Custom"
  424. end
  425. end
  426. c=Instance.new("ObjectValue")
  427. c.Name="creator"
  428. c.Value=Player
  429. c.Parent=h
  430. game:GetService("Debris"):AddItem(c,.5)
  431. end
  432. end
  433.  
  434. function MagniDamage(Part,dis,mind,maxd,force,knock)
  435. for _,c in pairs(workspace:children()) do
  436. local hum=c:findFirstChild("Humanoid")
  437. if hum~=nil then
  438. local head=c:findFirstChild("Torso")
  439. if head~=nil then
  440. local targ=head.Position-Part.Position
  441. local mag=targ.magnitude
  442. if mag<=dis and c.Name~=c.Name then
  443. Damagefunc(Part,hum.Parent.Torso,mind,maxd,force,knock,c.HumanoidRootPart,.2,1)
  444. end
  445. end
  446. end
  447. end
  448. end
  449.  
  450. game:GetService("RunService").RenderStepped:connect(function()
  451. Humanoid.MaxHealth = Humanoid.MaxHealth*2
  452. Humanoid.Health = Humanoid.MaxHealth*2
  453. c.HumanoidRootPart.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(0,0,0)).p,mouse.hit.p)
  454. c.HumanoidRootPart.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-2)
  455. W.C0 = W.C0 * CFrame.Angles(math.rad(3),0,0)
  456. for i,v in pairs (c:children()) do
  457. if v.ClassName == "Part" then
  458. v.Velocity = Vector3.new(0,0,0)
  459. end
  460. end
  461. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement