Advertisement
AndyWolf6610

Dio Throwing Knife (Fe By Me)

Nov 13th, 2019
145
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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. ------------------------------------------------------------------
  153. local p = game.Players.LocalPlayer
  154. local char = p.Character
  155. local hed = char.Head
  156. local LocalPlayer = p
  157.  
  158. local naeeym = Instance.new("BillboardGui",char)
  159. naeeym.Size = UDim2.new(0,100,0,40)
  160. naeeym.StudsOffset = Vector3.new(0,5,0)
  161. naeeym.Adornee = char.Head
  162. local tecks = Instance.new("TextLabel",naeeym)
  163. tecks.BackgroundTransparency = 1
  164. tecks.BorderSizePixel = 0
  165. tecks.Text = LocalPlayer.Name
  166. tecks.Font = "ArialBold"
  167. tecks.FontSize = "Size24"
  168. tecks.TextStrokeTransparency = 0
  169. tecks.TextStrokeColor3 = Color3.new(0,0,0)
  170. tecks.TextColor3 = Color3.new(255,255,255)
  171. tecks.Size = UDim2.new(1,0,0.5,0)
  172.  
  173. local Player = game.Players.localPlayer
  174. local Character = p.Character
  175. local LeftArm2 = Character["Left Arm"]
  176. local RightArm2 = Character["Right Arm"]
  177. local LeftLeg2 = Character["Left Leg"]
  178. local RightLeg2 = Character["Right Leg"]
  179. local Head2 = Character.Head
  180. local Torso2 = Character.Torso
  181.  
  182. --created by SoldierJoao
  183. --Credits to metabee for the knives edit
  184. cut = Instance.new("Sound", Character)
  185. cut.SoundId = "https://www.roblox.com/asset/?id=97095069"
  186. cut.Volume = 1.5
  187. thri = Instance.new("Sound", Character)
  188. thri.SoundId = "https://www.roblox.com/asset/?id=186311262"
  189. thri.Volume = 2.5
  190. WRY = Instance.new("Sound", Character)
  191. WRY.SoundId = "https://www.roblox.com/asset/?id=276152532"
  192. WRY.Volume = 5
  193.  
  194. local Players=game:service'Players'
  195. local Player=Players.LocalPlayer
  196. local Mouse=Player:GetMouse''
  197. local RenderStepped=game:service'RunService'.RenderStepped
  198.  
  199. local MeshId='http://www.roblox.com/asset?id=202083123'
  200. local TextureId='http://www.roblox.com/asset/?id=189436355'
  201.  
  202. local BeeSpeed= 100
  203.  
  204. local QHold=false
  205. local EHold=false
  206.  
  207. Mouse.Button1Down:connect(function()
  208. cut:Play()
  209. if Mouse.Target then
  210. local Bee=Instance.new('Part',Player.Character)
  211. Bee.CanCollide=false
  212. Bee.Size=Vector3.new(2,2,2)
  213. Bee.CFrame=Player.Character.Torso.CFrame
  214. local BeeMesh=Instance.new('SpecialMesh',Bee)
  215. BeeMesh.MeshType='FileMesh'
  216. BeeMesh.MeshId=MeshId
  217. BeeMesh.TextureId=TextureId
  218. BeeMesh.Scale=Vector3.new(1,1,1)
  219. local BodyVel=Instance.new('BodyVelocity',Bee)
  220. BodyVel.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  221. local BodyGyro=Instance.new('BodyGyro',Bee)
  222. BodyGyro.maxTorque=Vector3.new(math.huge,math.huge,math.huge)
  223. BodyGyro.P=2e4
  224. coroutine.wrap(function()
  225. RenderStepped:connect(function()
  226. BodyGyro.cframe=CFrame.new(Bee.Position,Mouse.Hit.p)
  227. BodyVel.velocity=Bee.CFrame.lookVector*BeeSpeed
  228. end)
  229. end)()
  230. Bee.Touched:connect(function(p)
  231. if p.Parent~=Player.Character and p.Parent:FindFirstChild'Humanoid'then
  232. p.Parent:BreakJoints()
  233. Bee:Destroy''
  234. thri:Play()
  235. end
  236. end)
  237. end
  238. end)
  239.  
  240.  
  241. Mouse.KeyDown:connect(function(k)
  242. local Key=k:lower''
  243. if Key=='q'then
  244. QHold=true
  245. elseif Key=='e'then
  246. EHold=true
  247. end
  248. end)
  249.  
  250. Mouse.KeyUp:connect(function(k)
  251. local Key=k:lower''
  252. if Key=='q'then
  253. QHold=false
  254. elseif Key=='e'then
  255. EHold=false
  256. end
  257. end)
  258.  
  259. coroutine.wrap(function()
  260. RenderStepped:connect(function()
  261. if QHold then
  262. if BeeSpeed>0 then
  263. BeeSpeed=BeeSpeed-1
  264. end
  265. elseif EHold then
  266. BeeSpeed=BeeSpeed+1
  267. end
  268. end)
  269. end)()
  270.  
  271.  
  272.  
  273.  
  274. mse = Player:GetMouse()
  275.  
  276. sound = Instance.new("Sound", Character)
  277. sound.SoundId = "https://www.roblox.com/asset/?id=290807425"
  278. sound.Volume = 2.5
  279. sound2 = Instance.new("Sound", Character)
  280. sound2.SoundId = "https://www.roblox.com/asset/?id=290810519"
  281. sound2.Volume = 2.5
  282. sound3 = Instance.new("Sound", Character)
  283. sound3.SoundId = "https://www.roblox.com/asset/?id=290807377"
  284. sound3.Volume = 1.8
  285. sound4 = Instance.new("Sound", Character)
  286. sound4.SoundId = "https://www.roblox.com/asset/?id=290807397"
  287. sound4.Volume = 2
  288. TSTheme = Instance.new("Sound", Character)
  289. TSTheme.SoundId = "https://www.roblox.com/asset/?id=172374380"
  290. TSTheme.Volume = 2
  291. canworld = true
  292. mse.KeyDown:connect(function(key)
  293. key = key:lower()
  294. if key == "t" then
  295. if canworld == false then return end
  296. if canworld then
  297. canworld = false
  298. sound3:Play()
  299. tecks.Text = "THE WORLD STOP TIME!"
  300. wait(2)
  301. tecks.Text = LocalPlayer.Name
  302. sound:Play()
  303. sound4:Play()
  304. TSTheme:Play()
  305.  
  306. local function spawnpart()
  307. sphere = Instance.new("Part")
  308. --game.Debris:AddItem(sphere,3)
  309. local sm = Instance.new("SpecialMesh", sphere)
  310. sm.MeshType = "Sphere"
  311. sphere.Transparency = 0.5
  312. sphere.Anchored = true
  313. sphere.CanCollide = false
  314. sphere.Material = "Neon"
  315. sphere.BrickColor = BrickColor.new("Black")
  316. end
  317.  
  318. local function weld(lol)
  319. local weld = Instance.new("Weld", Player.Character.Torso)
  320. weld.Part0 = Player.Character.Torso
  321. weld.Part1 = lol
  322. weld.C0 = Player.Character.Torso.CFrame:inverse()
  323. weld.C1 = lol.CFrame:inverse()
  324. end
  325. wait()
  326. spawnpart()
  327. for i, v in pairs(game.Players:GetChildren()) do
  328. t = v.Character:FindFirstChild("Torso")
  329. if t then
  330. t.Anchored = true
  331. Player.Character:FindFirstChild("Torso").Anchored = false
  332. end
  333. RA = v.Character:FindFirstChild("Right Arm")
  334. if RA then
  335. RA.Anchored = true
  336. Player.Character:FindFirstChild("Right Arm").Anchored = false
  337. end
  338. LA = v.Character:FindFirstChild("Left Arm")
  339. if LA then
  340. LA.Anchored = true
  341. Player.Character:FindFirstChild("Left Arm").Anchored = false
  342. end
  343. RL = v.Character:FindFirstChild("Right Leg")
  344. if RL then
  345. RL.Anchored = true
  346. Player.Character:FindFirstChild("Right Leg").Anchored = false
  347. end
  348. LL = v.Character:FindFirstChild("Left Leg")
  349. if LL then
  350. LL.Anchored = true
  351. Player.Character:FindFirstChild("Left Leg").Anchored = false
  352. end
  353. end
  354. weld(sphere)
  355. cce = Instance.new("ColorCorrectionEffect", game.Lighting)
  356. cce.Saturation = -5
  357. --game.Debris:AddItem(cce, 5)
  358. sphere.Parent = Character.Torso
  359. for i = 1,3 do
  360. sphere.Size = sphere.Size + Vector3.new(50,50,50)
  361. wait()
  362. end
  363. wait()
  364. sphere:Destroy()
  365. BeeSpeed = 0
  366. cce.Saturation = -0.1
  367. wait(0.3)
  368. cce.Saturation = -0.2
  369. wait(0.3)
  370. cce.Saturation = -0.3
  371. wait(0.2)
  372. cce.Saturation = -1.5
  373. wait()
  374. end
  375. end
  376. end
  377. )
  378.  
  379. tecks.Text = LocalPlayer.Name
  380.  
  381. mse.KeyDown:connect(function(key)
  382. key = key:lower()
  383. if key == "y" then
  384. canworld = true
  385. tecks.Text = "Time continues moving again."
  386. sound2:Play()
  387. wait()
  388. BeeSpeed = 1
  389. cce.Saturation = -1.3
  390. wait(0.5)
  391. BeeSpeed = 1.2
  392. cce.Saturation = -0.5
  393. wait(0.5)
  394. BeeSpeed = 1.4
  395. cce.Saturation = -0.4
  396. wait(0.3)
  397. BeeSpeed = 1.5
  398. cce.Saturation = -0.2
  399. wait(0.2)
  400. cce.Saturation = 0
  401.  
  402. for i, v in pairs(game.Players:GetChildren()) do
  403. t = v.Character:FindFirstChild("Torso")
  404. if t then
  405. t.Anchored = false
  406. end
  407. RA = v.Character:FindFirstChild("Right Arm")
  408. if RA then
  409. RA.Anchored = false
  410. end
  411. LA = v.Character:FindFirstChild("Left Arm")
  412. if LA then
  413. LA.Anchored = false
  414. end
  415. RL = v.Character:FindFirstChild("Right Leg")
  416. if RL then
  417. RL.Anchored = false
  418. end
  419. LL = v.Character:FindFirstChild("Left Leg")
  420. if LL then
  421. LL.Anchored = false
  422. end
  423. end
  424. BeeSpeed = 100
  425. tecks.Text = LocalPlayer.Name
  426. TSTheme:Stop()
  427. end
  428. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement