SHARE
TWEET

Untitled

a guest Nov 8th, 2019 86 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.     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.  
  152. local num = 0
  153. local p = game.Players.LocalPlayer
  154. local char = p.Character
  155. local rad = math.rad
  156. local hum = char.Humanoid
  157. local LeftUpperArm = char.LeftUpperArm
  158. local LeftShoulder = char.LeftUpperArm.LeftShoulder
  159. local LeftLowerArm = char.LeftLowerArm
  160. local LeftElbow = char.LeftLowerArm.LeftElbow
  161. local LeftUpperLeg = char.LeftUpperLeg
  162. local LeftHip = char.LeftUpperLeg.LeftHip
  163. local LeftLowerLeg = char.LeftLowerLeg
  164. local LeftKnee = char.LeftLowerLeg.LeftKnee
  165. local RightUpperArm = char.RightUpperArm
  166. local RightShoulder = char.RightUpperArm.RightShoulder
  167. local RightLowerArm = char.RightLowerArm
  168. local RightElbow = char.RightLowerArm.RightElbow
  169. local RightUpperLeg = char.RightUpperLeg
  170. local RightHip = char.RightUpperLeg.RightHip
  171. local RightLowerLeg = char.RightLowerLeg
  172. local RightKnee = char.RightLowerLeg.RightKnee
  173. local UpperTorso = char.UpperTorso
  174. local LowerTorso = char.LowerTorso
  175. local Root = char.LowerTorso.Root
  176. local Head = char.Head
  177. local Neck = char.Head.Neck
  178. local RootPart = char.HumanoidRootPart
  179. local LeftHand = char.LeftHand
  180. local RightHand = char.RightHand
  181. local LeftFoot = char.LeftFoot
  182. local RightFoot = char.RightFoot
  183. Instance.new("ForceField", char).Visible = false
  184. hum:SetStateEnabled("Dead", false)
  185. hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  186. local candie = false
  187. local Udyne = true
  188. local v3 = Vector3.new
  189. local idle = true
  190. local walk = true
  191. local debounce = true
  192. local mouse = p:GetMouse()
  193. local walk1 = true
  194. local walkon = true
  195. local ns = NumberSequence.new
  196. local new = Instance.new
  197. local nr = NumberRange.new
  198. local bc = BrickColor.new
  199. local UpperTorso = char.UpperTorso
  200. local Waist = char.UpperTorso.Waist
  201. local srot = 0
  202. local spos = {
  203.   [1] = {180},
  204.   [2] = {144},
  205.   [3] = {108},
  206.   [4] = {72},
  207.   [5] = {36},
  208.   [6] = {0}
  209. }
  210. local hitsnd = new("Sound", char)
  211. hitsnd.SoundId = "rbxassetid://410625063"
  212. hitsnd.Volume = 10
  213. hitsnd.Pitch = 1
  214. for i = 1, 20 do
  215.   LeftShoulder.C0 = LeftShoulder.C0:lerp(CFrame.new(LeftShoulder.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  216.   RightShoulder.C0 = RightShoulder.C0:lerp(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(rad(120), rad(0), rad(0)), 0.1)
  217.   LeftElbow.C0 = LeftElbow.C0:lerp(CFrame.new(LeftElbow.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  218.   RightElbow.C0 = RightElbow.C0:lerp(CFrame.new(RightElbow.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  219.   LeftHip.C0 = LeftHip.C0:lerp(CFrame.new(LeftHip.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  220.   RightHip.C0 = RightHip.C0:lerp(CFrame.new(RightHip.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  221.   LeftKnee.C0 = LeftKnee.C0:lerp(CFrame.new(LeftKnee.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  222.   RightKnee.C0 = RightKnee.C0:lerp(CFrame.new(RightKnee.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  223.   Root.C0 = Root.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  224.   Neck.C0 = Neck.C0:lerp(CFrame.new(Neck.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  225.   RightFoot.RightAnkle.C0 = RightFoot.RightAnkle.C0:lerp(CFrame.new(RightFoot.RightAnkle.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  226.   LeftFoot.LeftAnkle.C0 = LeftFoot.LeftAnkle.C0:lerp(CFrame.new(LeftFoot.LeftAnkle.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  227.   RightHand.RightWrist.C0 = RightHand.RightWrist.C0:lerp(CFrame.new(RightHand.RightWrist.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  228.   LeftHand.LeftWrist.C0 = LeftHand.LeftWrist.C0:lerp(CFrame.new(LeftHand.LeftWrist.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  229.   Waist.C0 = Waist.C0:lerp(CFrame.new(Waist.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  230.   wait()
  231. end
  232. wait(0.5)
  233. for i = 1, 20 do
  234.   LeftShoulder.C0 = LeftShoulder.C0:lerp(CFrame.new(LeftShoulder.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  235.   RightShoulder.C0 = RightShoulder.C0:lerp(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  236.   LeftElbow.C0 = LeftElbow.C0:lerp(CFrame.new(LeftElbow.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  237.   RightElbow.C0 = RightElbow.C0:lerp(CFrame.new(RightElbow.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  238.   LeftHip.C0 = LeftHip.C0:lerp(CFrame.new(LeftHip.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  239.   RightHip.C0 = RightHip.C0:lerp(CFrame.new(RightHip.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  240.   LeftKnee.C0 = LeftKnee.C0:lerp(CFrame.new(LeftKnee.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  241.   RightKnee.C0 = RightKnee.C0:lerp(CFrame.new(RightKnee.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  242.   Root.C0 = Root.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  243.   Neck.C0 = Neck.C0:lerp(CFrame.new(Neck.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  244.   RightFoot.RightAnkle.C0 = RightFoot.RightAnkle.C0:lerp(CFrame.new(RightFoot.RightAnkle.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  245.   LeftFoot.LeftAnkle.C0 = LeftFoot.LeftAnkle.C0:lerp(CFrame.new(LeftFoot.LeftAnkle.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  246.   RightHand.RightWrist.C0 = RightHand.RightWrist.C0:lerp(CFrame.new(RightHand.RightWrist.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  247.   LeftHand.LeftWrist.C0 = LeftHand.LeftWrist.C0:lerp(CFrame.new(LeftHand.LeftWrist.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  248.   Waist.C0 = Waist.C0:lerp(CFrame.new(Waist.C0.p) * CFrame.Angles(rad(0), rad(0), rad(0)), 0.1)
  249.   wait()
  250. end
  251. local udynespear1 = new("Part", char)
  252. udynespear1.BrickColor = bc("Toothpaste")
  253. udynespear1.Material = "Neon"
  254. udynespear1.CanCollide = false
  255. udynespear1.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 10, 0)
  256. udynespear1.Size = Vector3.new(1, 1, 1)
  257. local udynespear2 = new("Part", char)
  258. udynespear2.BrickColor = udynespear1.BrickColor
  259. udynespear2.Material = udynespear1.Material
  260. udynespear2.CanCollide = false
  261. udynespear2.CFrame = udynespear1.CFrame
  262. udynespear2.Size = udynespear1.Size
  263. local udynespear3 = new("Part", char)
  264. udynespear3.BrickColor = udynespear1.BrickColor
  265. udynespear3.Material = udynespear1.Material
  266. udynespear3.CanCollide = false
  267. udynespear3.CFrame = udynespear1.CFrame
  268. udynespear3.Size = udynespear1.Size
  269. local udynespear4 = new("Part", char)
  270. udynespear4.BrickColor = udynespear1.BrickColor
  271. udynespear4.Material = udynespear1.Material
  272. udynespear4.CanCollide = false
  273. udynespear4.CFrame = udynespear1.CFrame
  274. udynespear4.Size = udynespear1.Size
  275. local udynespear5 = new("Part", char)
  276. udynespear5.BrickColor = udynespear1.BrickColor
  277. udynespear5.Material = udynespear1.Material
  278. udynespear5.CanCollide = false
  279. udynespear5.CFrame = udynespear1.CFrame
  280. udynespear5.Size = udynespear1.Size
  281. local udynespear6 = new("Part", char)
  282. udynespear6.BrickColor = udynespear1.BrickColor
  283. udynespear6.Material = udynespear1.Material
  284. udynespear6.CanCollide = false
  285. udynespear6.CFrame = udynespear1.CFrame
  286. udynespear6.Size = udynespear1.Size
  287. local zxc = Instance.new("SpecialMesh", udynespear1)
  288. zxc.MeshType = "FileMesh"
  289. zxc.Scale = Vector3.new(3, 3, 3)
  290. zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  291. local zxc = Instance.new("SpecialMesh", udynespear2)
  292. zxc.MeshType = "FileMesh"
  293. zxc.Scale = Vector3.new(3, 3, 3)
  294. zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  295. local zxc = Instance.new("SpecialMesh", udynespear3)
  296. zxc.MeshType = "FileMesh"
  297. zxc.Scale = Vector3.new(3, 3, 3)
  298. zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  299. local zxc = Instance.new("SpecialMesh", udynespear4)
  300. zxc.MeshType = "FileMesh"
  301. zxc.Scale = Vector3.new(3, 3, 3)
  302. zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  303. local zxc = Instance.new("SpecialMesh", udynespear5)
  304. zxc.MeshType = "FileMesh"
  305. zxc.Scale = Vector3.new(3, 3, 3)
  306. zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  307. local zxc = Instance.new("SpecialMesh", udynespear6)
  308. zxc.MeshType = "FileMesh"
  309. zxc.Scale = Vector3.new(3, 3, 3)
  310. zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  311. local sbg6 = Instance.new("BodyGyro", udynespear6)
  312. sbg6.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  313. sbg6.D = 400
  314. BP6 = Instance.new("BodyPosition", udynespear6)
  315. local sbg5 = Instance.new("BodyGyro", udynespear5)
  316. sbg5.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  317. sbg5.D = 400
  318. BP5 = Instance.new("BodyPosition", udynespear5)
  319. local sbg4 = Instance.new("BodyGyro", udynespear4)
  320. sbg4.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  321. sbg4.D = 400
  322. BP4 = Instance.new("BodyPosition", udynespear4)
  323. local sbg3 = Instance.new("BodyGyro", udynespear3)
  324. sbg3.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  325. sbg3.D = 400
  326. BP3 = Instance.new("BodyPosition", udynespear3)
  327. local sbg2 = Instance.new("BodyGyro", udynespear2)
  328. sbg2.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  329. sbg2.D = 400
  330. BP2 = Instance.new("BodyPosition", udynespear2)
  331. local sbg = Instance.new("BodyGyro", udynespear1)
  332. sbg.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  333. sbg.D = 400
  334. BP = Instance.new("BodyPosition", udynespear1)
  335. spawn(function()
  336.   while Udyne == true do
  337.     BP2.Position = char.HumanoidRootPart.CFrame * CFrame.new(10, 5, 0).p
  338.     BP3.Position = char.HumanoidRootPart.CFrame * CFrame.new(6, 8, 0).p
  339.     BP.Position = char.HumanoidRootPart.CFrame * CFrame.new(3, 10, 0).p
  340.     BP4.Position = char.HumanoidRootPart.CFrame * CFrame.new(-6, 8, 0).p
  341.     BP5.Position = char.HumanoidRootPart.CFrame * CFrame.new(-3, 10, 0).p
  342.     BP6.Position = char.HumanoidRootPart.CFrame * CFrame.new(-10, 5, 0).p
  343.     sbg6.CFrame = CFrame.new(udynespear3.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  344.     sbg5.CFrame = CFrame.new(udynespear3.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  345.     sbg4.CFrame = CFrame.new(udynespear3.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  346.     sbg3.CFrame = CFrame.new(udynespear3.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  347.     sbg2.CFrame = CFrame.new(udynespear2.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  348.     sbg.CFrame = CFrame.new(udynespear2.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  349.     srot = srot + 4
  350.     if srot == 360 then
  351.       srot = 0
  352.     end
  353.     wait()
  354.   end
  355. end)
  356. local Light = Instance.new("PointLight", char.HumanoidRootPart)
  357. Light.Color = Color3.new(0, 0, 1)
  358. Light.Brightness = 100
  359. Light.Range = 10
  360. hdebounce = true
  361. function throw1spear()
  362.   coroutine.resume(coroutine.create(function()
  363.     local udynespeart = new("Part", char)
  364.     local zxc = Instance.new("SpecialMesh", udynespeart)
  365.     zxc.MeshType = "FileMesh"
  366.     zxc.Scale = Vector3.new(2, 2, 2)
  367.     zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  368.     udynespeart.BrickColor = udynespear1.BrickColor
  369.     udynespeart.Material = udynespear1.Material
  370.     udynespeart.CanCollide = false
  371.     udynespeart.Anchored = false
  372.     udynespeart.Size = Vector3.new(2, 2, 2)
  373.     udynespeart.CFrame = (char.HumanoidRootPart.CFrame + Vector3.new(math.random(1, 2), 0, 2)) * CFrame.fromEulerAnglesXYZ(math.random(0, math.rad(0)), math.random(0, math.rad(0)), math.random(0, math.rad(0)))
  374.     udynespeart.Touched:connect(function(hit)
  375.       if hit.Parent == char then
  376.         return
  377.       end
  378.       for i, v in pairs(hit.Parent:GetChildren()) do
  379.         if v:IsA("Humanoid") and hdebounce == true then
  380.           hdebounce = false
  381.           v.Health = v.Health - 10
  382.           wait(0.9)
  383.           hdebounce = true
  384.         end
  385.       end
  386.     end)
  387.     local sbgt = Instance.new("BodyGyro", udynespeart)
  388.     sbgt.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  389.     sbgt.D = 400
  390.     sbgt.CFrame = CFrame.new(udynespear3.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  391.     BPt = Instance.new("BodyPosition", udynespeart)
  392.     BPt.Position = udynespeart.CFrame * CFrame.new(0, 10, 0).p
  393.     wait(1)
  394.     udynespeart.Anchored = true
  395.     wait(0.5)
  396.     udynespeart.Anchored = false
  397.     BPt:destroy()
  398.     local BodyVelocity = Instance.new("BodyVelocity", udynespeart)
  399.     BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  400.     BodyVelocity.velocity = mouse.Hit.lookVector * 200
  401.     for i = 1, 5 do
  402.       sbgt.CFrame = CFrame.new(udynespeart.Position, mouse.Hit.p) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  403.       wait()
  404.     end
  405.     sbgt:destroy()
  406.   end))
  407. end
  408. mouse.KeyDown:connect(function(k)
  409.   if k == "e" then
  410.   end
  411. end)
  412. mouse.KeyDown:connect(function(k)
  413.   if k == "f" then
  414.     throw1spear()
  415.   end
  416. end)
  417. local hitt
  418. mouse.KeyDown:connect(function(k)
  419.   if k == "q" and mouse.Target then
  420.     if mouse.Target.Parent == char then
  421.       return
  422.     end
  423.     if mouse.Target.Parent == game.workspace.Base then
  424.       return
  425.     end
  426.     for i, v in pairs(mouse.Target.Parent:GetChildren()) do
  427.       if v:IsA("Humanoid") then
  428.         hitt = mouse.Target.Parent
  429.         if debounce == true then
  430.           debounce = false
  431.           for i = 1, 2 do
  432.             do
  433.               local speara = new("Part", char)
  434.               speara.Touched:connect(function(hit)
  435.                 if hit.Parent == char then
  436.                   return
  437.                 end
  438.                 for i, v in pairs(hit.Parent:GetChildren()) do
  439.                   if v:IsA("Humanoid") and hdebounce == true then
  440.                     hdebounce = false
  441.                     v.Health = v.Health - 10
  442.                     wait(0.9)
  443.                     hdebounce = true
  444.                   end
  445.                 end
  446.               end)
  447.               local gunlight = Instance.new("SpotLight", speara)
  448.               gunlight.Range = 40
  449.               gunlight.Angle = 60
  450.               gunlight.Face = "Top"
  451.               gunlight.Shadows = true
  452.               gunlight.Enabled = true
  453.               gunlight.Color = Color3.new(0, 0, 1)
  454.               local gunlight2 = Instance.new("SpotLight", speara)
  455.               gunlight2.Range = 40
  456.               gunlight2.Angle = 60
  457.               gunlight2.Face = "Top"
  458.               gunlight2.Shadows = true
  459.               gunlight2.Enabled = true
  460.               gunlight2.Color = Color3.new(0, 0, 1)
  461.               speara.Size = Vector3.new(2, 2, 2)
  462.               speara.BrickColor = bc("Toothpaste")
  463.               local zxc = Instance.new("SpecialMesh", speara)
  464.               zxc.MeshType = "FileMesh"
  465.               zxc.Scale = Vector3.new(2, 2, 2)
  466.               zxc.MeshId = "http://www.roblox.com/asset/?id=69891706"
  467.               speara.Transparency = 0
  468.               speara.Anchored = false
  469.               speara.CanCollide = false
  470.               speara.Name = "Spear"
  471.               speara.CFrame = (mouse.Hit + Vector3.new(math.random(-10, 10), 19, math.random(-10, 10))) * CFrame.fromEulerAnglesXYZ(math.random(0, math.rad(359)), math.random(0, math.rad(359)), math.random(0, math.rad(359)))
  472.               local sbgta = Instance.new("BodyGyro", speara)
  473.               sbgta.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  474.               sbgta.D = 10
  475.               BPta = Instance.new("BodyPosition", speara)
  476.               BPta.Name = "shootP"
  477.               BPta.P = 20000
  478.               sbgta.CFrame = CFrame.new(speara.Position, hitt.HumanoidRootPart.Position) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  479.               BPta.Position = speara.CFrame * CFrame.new(0, 2, 0).p
  480.               wait(0.9)
  481.               sbgta.D = 500
  482.               wait(1)
  483.               BPta.D = 1000
  484.               BPta.Position = hitt.HumanoidRootPart.CFrame * CFrame.new(0, -3, 0).p
  485.               sbgta.CFrame = CFrame.new(speara.Position, hitt.HumanoidRootPart.Position) * CFrame.Angles(-math.pi / 2, math.rad(srot), 0)
  486.               debounce = true
  487.               local gdisp = coroutine.wrap(function()
  488.                 wait(1)
  489.                 for i = 1, 9 do
  490.                   wait(0.1)
  491.                   speara.Transparency = speara.Transparency + 0.3
  492.                 end
  493.                 speara:Destroy()
  494.               end)
  495.               gdisp()
  496.             end
  497.           end
  498.         end
  499.       end
  500.     end
  501.   end
  502. end)
  503. health = hum.Health
  504. hum.Changed:connect(function()
  505.   if hum.Health < 5 and candie == false then
  506.     candie = true
  507.     defeated()
  508.   end
  509.   health = hum.Health
  510. end)
  511. p.Character.Humanoid.Died:connect(function()
  512.   local jkl = Instance.new("Sound", Workspace)
  513.   jkl.SoundId = "rbxassetid://427025525"
  514.   jkl.Volume = 10
  515.   jkl:Play()
  516.   for _, V in pairs(char:getChildren()) do
  517.     if V:isA("BasePart") then
  518.       V.Transparency = 1
  519.     elseif V:IsA("Accessory") and V:FindFirstChild("Handle") then
  520.       V.Handle.Transparency = 1
  521.     end
  522.   end
  523.   char.Head.face:destroy()
  524.   for i = 1, 50 do
  525.     dust = Instance.new("Part")
  526.     dust.Locked = true
  527.     dust.Size = Vector3.new(0.1, 0.1, 0.1)
  528.     dust.BrickColor = BrickColor.new("White")
  529.     dust.Transparency = 0
  530.     dust.TopSurface = "Smooth"
  531.     dust.BottomSurface = "Smooth"
  532.     dust.CFrame = char.HumanoidRootPart.CFrame
  533.     dust.CanCollide = true
  534.     dust.Reflectance = 0.1
  535.     dust.Material = "Neon"
  536.     dust.Parent = char
  537.     dust.Anchored = false
  538.   end
  539. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top