Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.20 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
  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.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165. --By Ruffles14
  166. mouse = game.Players.LocalPlayer:GetMouse()
  167. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  168. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  169. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  170. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  171. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  172. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  173. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  174. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  175. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  176. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  177. local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
  178. game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
  179. local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  180. humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
  181. humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
  182. local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
  183. local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  184. headweld.Part0 = game.Players.LocalPlayer.Character.Torso
  185. headweld.Part1 = game.Players.LocalPlayer.Character.Head
  186. headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
  187. game.Players.LocalPlayer.Character.Torso.Neck:Remove()
  188. using = false
  189. --Converted with ttyyuu12345's model to script plugin v4
  190. function sandbox(var,func)
  191. local env = getfenv(func)
  192. local newenv = setmetatable({},{
  193. __index = function(self,k)
  194. if k=="script" then
  195. return var
  196. else
  197. return env[k]
  198. end
  199. end,
  200. })
  201. setfenv(func,newenv)
  202. return func
  203. end
  204. cors = {}
  205. mas = Instance.new("Model",game:GetService("Lighting"))
  206. Part0 = Instance.new("Part")
  207. SpecialMesh1 = Instance.new("SpecialMesh")
  208. Part0.Parent = mas
  209. Part0.Rotation = Vector3.new(-17.039999, 72.0800018, -73.7399979)
  210. Part0.Size = Vector3.new(0.48999998, 2.96999931, 1.94999981)
  211. Part0.CFrame = CFrame.new(1.99671245, 4.08856773, -0.616976917, 0.0861581191, 0.29545939, 0.95146209, -0.99592489, 0, 0.090184398, 0.0266458243, -0.955355108, 0.294255406)
  212. Part0.BottomSurface = Enum.SurfaceType.Smooth
  213. Part0.TopSurface = Enum.SurfaceType.Smooth
  214. Part0.Position = Vector3.new(1.99671245, 4.08856773, -0.616976917)
  215. Part0.Orientation = Vector3.new(-5.17000008, 72.8099976, -90)
  216. Part0.CanCollide = false
  217. SpecialMesh1.Parent = Part0
  218. SpecialMesh1.MeshId = "rbxassetid://441572308"
  219. SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
  220. SpecialMesh1.TextureId = "rbxassetid://441572332"
  221. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  222. SpecialMesh1.Scale = Vector3.new(0.0209999997, 0.0209999997, 0.0209999997)
  223. for i,v in pairs(mas:GetChildren()) do
  224. v.Parent = game:GetService("Players").LocalPlayer.Character
  225. pcall(function() v:MakeJoints() end)
  226. end
  227. mas:Destroy()
  228. for i,v in pairs(cors) do
  229. spawn(function()
  230. pcall(v)
  231. end)
  232. end
  233. Part0:BreakJoints()
  234. cananimate = true
  235. canhit = false
  236. local weld = Instance.new("Weld", game.Players.LocalPlayer.Character["Right Arm"])
  237. weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  238. weld.Part1 = Part0
  239. weld.C0 = CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0)
  240. for i = 0,1 , 0.03 do
  241. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
  242. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
  243. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
  244. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
  245. game:GetService("RunService").RenderStepped:wait()
  246. end
  247. function swing()
  248. if not using then
  249. using = true
  250. cananimate = false
  251. for i = 0,1 , 0.045 do
  252. weld.C0 = weld.C0:lerp(CFrame.new(0.958130836, -0.815908253, -0.0419664383, 0.379335552, 0.92491132, -0.0253674984, -0.913223445, 0.378668189, 0.150445476, 0.148754537, -0.0339030921, 0.988292694),i)
  253. headweld.C0 = headweld.C0:lerp(CFrame.new(-4.65661287e-10, 1.49999952, 0, 0.601507425, -2.32830644e-10, 0.798867226, 3.0559022e-10, 1, 0, -0.798867226, -4.65661287e-10, 0.601507425),i)
  254. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.63088727, -0.00573391188, -0.775853336, 0, 0.999972701, -0.00739025697, 0.775874496, 0.00466241874, 0.630870044),i)
  255. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(0.0363237262, 0.350219727, -1.1563791, 0.495106995, -0.857149601, 0.1419992, 0.110766649, -0.0998312235, -0.988819599, 0.861742377, 0.505300522, 0.0455164276),i)
  256. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.50056481, 0.516354084, -0.499166548, 0.995925009, -0.00520473719, 0.09003409, 0.0901844054, 0.0574772507, -0.994265079, -2.98023224e-08, 0.998333335, 0.057712432),i)
  257. game:GetService("RunService").RenderStepped:wait()
  258. end
  259. canhit = true
  260. for i = 0,1 , 0.08 do
  261. weld.C0 = weld.C0:lerp(CFrame.new(0.968596578, -1.15575922, 0.178524971, 0.0531506836, 0.988890588, -0.13881819, -0.988834679, 0.0327400565, -0.145376131, -0.13921617, 0.144995078, 0.979589343),i)
  262. headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0249017328, 1.48724031, 2.04332173e-06, 0.499998868, 0, -0.866026163, 0, 1, 0, 0.866026163, 0, 0.499998868),i)
  263. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.305942208, 0, -0.952050149, 0, 1, 0, 0.952050149, 0, 0.305942208):inverse(),i)
  264. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.07653618, 0.305679321, -0.818206966, 0.707105398, -0.707108259, 4.32133675e-07, 0.122787982, 0.122786887, -0.984807909, 0.696365714, 0.696363032, 0.173647687),i)
  265. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.74788636, 0.363031864, -0.7663396, 0.70710665, 0.707106948, -2.23517418e-08, -0.0616280138, 0.061627958, -0.99619478, -0.704416275, 0.704416037, 0.0871551335),i)
  266. game:GetService("RunService").RenderStepped:wait()
  267. end
  268. canhit = false
  269. using = false
  270. cananimate = true
  271. end
  272. end
  273. mouse.Button1Down:connect(swing)
  274. function hittie(part)
  275. if canhit then
  276. local humanoid = part.Parent:findFirstChildOfClass("Humanoid")
  277. if humanoid then
  278. canhit = false
  279. using = false
  280. local uptor = humanoid.Parent:findFirstChild("UpperTorso")
  281. if uptor and uptor.Parent.Name ~= game.Players.LocalPlayer.Name then
  282. humanoid.Parent:BreakJoints()
  283. while humanoid.Health >= 0.001 do
  284. game:GetService("RunService").RenderStepped:wait()
  285. end
  286. if humanoid.Parent:findFirstChild("HumanoidRootPart") then
  287. humanoid.Parent.HumanoidRootPart.CanCollide = false
  288. end
  289. local function makeballlimb(attachone, attachtwo, upperang, lowang, twist)
  290. local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
  291. constraint.Attachment0 = attachone
  292. constraint.Attachment1 = attachtwo
  293. constraint.LimitsEnabled = true
  294. constraint.TwistLimitsEnabled = true
  295. constraint.TwistLowerAngle = lowang
  296. constraint.TwistUpperAngle = upperang
  297. constraint.UpperAngle = twist
  298. end
  299. local function makehingelimb(attachone, attachtwo, upperang, lowang)
  300. local constraint = Instance.new("HingeConstraint", humanoid.Parent)
  301. constraint.Attachment0 = attachone
  302. constraint.Attachment1 = attachtwo
  303. constraint.LimitsEnabled = true
  304. constraint.LowerAngle = lowang
  305. constraint.UpperAngle = upperang
  306. end
  307. for i,v in pairs(humanoid.Parent:GetChildren()) do --scan player
  308. if v.ClassName == "Accessory" then
  309. local findhandle = v:findFirstChild("Handle") --finding handle in accesorry
  310. if findhandle then
  311. local attach = findhandle:findFirstChildOfClass("Attachment")
  312. for q,w in pairs(humanoid.Parent:GetChildren()) do --scan player
  313. if w.Name == "UpperTorso" or w.Name == "Head" then
  314. attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso
  315. end
  316. end
  317. if attach and attach1 then
  318. local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
  319. constraint.Attachment0 = attach
  320. constraint.Attachment1 = attach1
  321. constraint.LimitsEnabled = true
  322. constraint.LowerAngle = 0
  323. constraint.UpperAngle = 0
  324. end
  325. end
  326. end
  327. end
  328. if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
  329. local attachment = Instance.new("Attachment", humanoid.Parent.Head)
  330. attachment.Position = Vector3.new(0, -0.5, 0)
  331. attachment.Name = "lol"
  332. attachment.Visible = false
  333. humanoid.Parent.UpperTorso.NeckAttachment.Visible = false
  334. humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0)
  335. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  336. ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment
  337. ball.Attachment1 = attachment
  338. ball.LimitsEnabled = true
  339. ball.TwistLimitsEnabled = true
  340. ball.UpperAngle = 40
  341. ball.Restitution = 0.5
  342. ball.TwistUpperAngle = 40
  343. ball.TwistLowerAngle = -40
  344. local collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
  345. collidepartofleftleg.Name = "Bone"
  346. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  347. collidepartofleftleg.Transparency = 1
  348. collidepartofleftleg:BreakJoints()
  349. local weeld = Instance.new("Weld", collidepartofleftleg)
  350. weeld.Part0 = collidepartofleftleg
  351. weeld.Part1 = humanoid.Parent["Head"]
  352. if humanoid.Parent.Head:findFirstChild("Neck") then
  353. humanoid.Parent.Head.Neck:destroy()
  354. end
  355. if humanoid.Parent.Head:findFirstChild("face") then
  356. humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
  357. end
  358. end
  359. local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
  360. local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
  361. --
  362. local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
  363. local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
  364. --
  365. local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
  366. local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
  367. --
  368. local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
  369. local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
  370. --Foot & Hands--
  371.  
  372. local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
  373. local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
  374. --
  375. local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
  376. local RightHand = humanoid.Parent:findFirstChild("RightHand")
  377.  
  378. --END--
  379. --TORSOS--
  380.  
  381. local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
  382. local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
  383.  
  384. --END--
  385. if LowerTorso then
  386. if LeftUpperLeg then
  387. makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90)
  388. end
  389. if RightUpperLeg then
  390. makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90)
  391. end
  392. if LeftLowerLeg then
  393. makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90)
  394. end
  395. if RightLowerLeg then
  396. makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90)
  397. end
  398. if LeftFoot then
  399. makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30)
  400. end
  401. if RightFoot then
  402. makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30)
  403. end
  404. if UpperTorso then
  405. makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30)
  406. end
  407. end
  408. if UpperTorso then
  409. local vel = Instance.new("BodyVelocity", UpperTorso)
  410. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  411. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
  412. game.Debris:AddItem(vel, 0.1)
  413. local hitsound = Instance.new("Sound", UpperTorso)
  414. hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
  415. hitsound:Play()
  416. hitsound.Volume = math.random(5,10)
  417. local canhit = true
  418. local hitval = 15
  419. local uptor = humanoid.Parent.UpperTorso
  420. if RightUpperArm then
  421. makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180)
  422. end
  423. if RightLowerArm then
  424. makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90)
  425. end
  426. if RightHand then
  427. makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30)
  428. end
  429. if LeftUpperArm then
  430. makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180)
  431. end
  432. if LeftLowerArm then
  433. makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90)
  434. end
  435. if LeftHand then
  436. makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30)
  437. end
  438. end
  439. else
  440. humanoid.Parent.Archivable = true
  441. humanoid.PlatformStand = true
  442. local clone = humanoid.Parent:Clone()
  443. clone.Parent = workspace
  444. game.Debris:AddItem(clone, 60)
  445. for i,v in pairs(clone:GetChildren()) do
  446. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  447. v:Remove()
  448. end
  449. for i,p in pairs(v:GetChildren()) do
  450. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  451. p:Remove()
  452. end
  453. end
  454. end
  455. for i,t in pairs(humanoid.Parent:GetChildren()) do
  456. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  457. t:Remove()
  458. end
  459. end
  460. local vel = Instance.new("BodyVelocity", clone.Torso)
  461. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  462. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 15
  463. game.Debris:AddItem(vel, 0.1)
  464. local hitsound = Instance.new("Sound", clone.Torso)
  465. hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502"
  466. hitsound:Play()
  467. hitsound.Volume = math.random(5,10)
  468. vel = Instance.new("BodyVelocity", clone.Torso)
  469. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  470. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  471. using = false
  472. hit = Instance.new("Sound", clone.Torso)
  473. hit.SoundId = "rbxassetid://260430060"
  474. hit.Volume = 0
  475. hit1 = Instance.new("Sound", clone.Torso)
  476. hit1.SoundId = "rbxassetid://138087186"
  477. hit1.Volume = 0
  478. hit2 = Instance.new("Sound", clone.Torso)
  479. hit2.SoundId = "rbxassetid://131237241"
  480. hit2.Volume = 0
  481. hit3 = Instance.new("Sound", clone.Torso)
  482. hit3.SoundId = "rbxassetid://278062209"
  483. hit3.Volume = 0
  484. hit3.TimePosition = 0.33
  485. ded = Instance.new("Sound", clone.Torso)
  486. ded.SoundId = "rbxassetid://418892870"
  487. ded.Volume = 0
  488. local leftarm = clone:findFirstChild("Left Arm")
  489. local rightrm = clone:findFirstChild("Right Arm")
  490. local leftleg = clone:findFirstChild("Left Leg")
  491. local rightleg = clone:findFirstChild("Right Leg")
  492. local head = clone:findFirstChild("Head")
  493. for i, g in pairs(humanoid.Parent:GetChildren()) do
  494. if g.ClassName == "Part" then
  495. g:destroy()
  496. end
  497. end
  498. for i, h in pairs(humanoid.Parent:GetChildren()) do
  499. if h.ClassName == "Accesory" then
  500. h:destroy()
  501. end
  502. end
  503. for z,x in pairs(clone:GetChildren()) do
  504. if x.ClassName == "Accessory" then
  505. local handle = x:findFirstChild("Handle")
  506. if handle then
  507. local attachment = handle:findFirstChildOfClass("Attachment")
  508. if attachment then
  509. for q,w in pairs(clone:GetChildren()) do
  510. if w.Name == "Torso" or w.Name == "Head" then
  511. local anotherone = w:findFirstChild(attachment.Name)
  512. if attachment and anotherone then
  513. local constraint = Instance.new("HingeConstraint", clone) --making fake weld
  514. constraint.Attachment0 = attachment
  515. constraint.Attachment1 = anotherone
  516. constraint.LimitsEnabled = true
  517. constraint.LowerAngle = 0
  518. constraint.UpperAngle = 0
  519. end
  520. end
  521. end
  522. end
  523. end
  524. end
  525. end
  526. if head and clone.Torso:findFirstChild("NeckAttachment") then
  527. local attachment = Instance.new("Attachment", clone.Head)
  528. attachment.Position = Vector3.new(0, -0.5, 0)
  529. attachment.Name = "lol"
  530. attachment.Visible = false
  531. clone.Torso.NeckAttachment.Visible = false
  532. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  533. local ball = Instance.new("BallSocketConstraint", clone)
  534. ball.Attachment0 = clone.Torso.NeckAttachment
  535. ball.Attachment1 = attachment
  536. ball.LimitsEnabled = true
  537. ball.TwistLimitsEnabled = true
  538. ball.UpperAngle = 90
  539. ball.Restitution = 0.5
  540. ball.TwistUpperAngle = 90
  541. ball.TwistLowerAngle = -90
  542. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  543. collidepartofleftleg.Name = "Bone"
  544. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  545. collidepartofleftleg.Transparency = 1
  546. collidepartofleftleg:BreakJoints()
  547. local weeld = Instance.new("Weld", collidepartofleftleg)
  548. weeld.Part0 = collidepartofleftleg
  549. weeld.Part1 = clone["Head"]
  550. end
  551. if leftleg ~= nil then
  552. leftleg:BreakJoints()
  553. local glue = Instance.new("Glue", clone.Torso)
  554. glue.Part0 = clone.Torso
  555. glue.Part1 = leftleg
  556. glue.Name = "Left leg"
  557. local collider = Instance.new("Part", leftleg)
  558. collider.Position = Vector3.new(0,999,0)
  559. collider.Size = Vector3.new(1.5, 1, 1)
  560. collider.Shape = "Cylinder"
  561. local weld = Instance.new("Weld", collider)
  562. weld.Part0 = leftleg
  563. weld.Part1 = collider
  564. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  565. collider.TopSurface = "Smooth"
  566. collider.BottomSurface = "Smooth"
  567. collider.formFactor = "Symmetric"
  568. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  569. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  570. collider.Transparency = 1
  571. end
  572. ------------
  573. if rightleg ~= nil then
  574. rightleg:BreakJoints()
  575. local glue1 = Instance.new("Glue", clone.Torso)
  576. glue1.Part0 = clone.Torso
  577. glue1.Part1 = rightleg
  578. glue1.Name = "Right leg"
  579. local collider1 = Instance.new("Part", rightleg)
  580. collider1.Position = Vector3.new(0,999,0)
  581. collider1.Size = Vector3.new(1.5, 1, 1)
  582. collider1.Shape = "Cylinder"
  583. local weld1 = Instance.new("Weld", collider1)
  584. weld1.Part0 = rightleg
  585. weld1.Part1 = collider1
  586. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  587. collider1.TopSurface = "Smooth"
  588. collider1.BottomSurface = "Smooth"
  589. collider1.formFactor = "Symmetric"
  590. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  591. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  592. collider1.Transparency = 1
  593. end
  594. ------------
  595. if rightrm ~= nil then
  596. rightrm:BreakJoints()
  597. rightrm.CFrame = clone.Torso.CFrame * CFrame.new(1.7,0,0)
  598. local glue11 = Instance.new("Glue", clone.Torso)
  599. glue11.Part0 = clone.Torso
  600. glue11.Part1 = rightrm
  601. glue11.Name = "Right shoulder"
  602. local collider11 = Instance.new("Part", rightrm)
  603. collider11.Position = Vector3.new(0,9999,0)
  604. collider11.Size = Vector3.new(1.5,1,1)
  605. collider11.Shape = "Cylinder"
  606. local weld11 = Instance.new("Weld", collider11)
  607. weld11.Part0 = rightrm
  608. weld11.Part1 = collider11
  609. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  610. collider11.TopSurface = "Smooth"
  611. collider11.BottomSurface = "Smooth"
  612. collider11.formFactor = "Symmetric"
  613. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  614. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  615. collider11.Transparency = 1
  616. end
  617. ------------
  618. if leftarm ~= nil then
  619. leftarm.CFrame = clone.Torso.CFrame * CFrame.new(-1.7,0,0)
  620. leftarm:BreakJoints()
  621. local glue111 = Instance.new("Glue", clone.Torso)
  622. glue111.Part0 = clone.Torso
  623. glue111.Part1 = leftarm
  624. glue111.Name = "Left shoulder"
  625. local collider111 = Instance.new("Part", leftarm)
  626. collider111.Position = Vector3.new(0,9999,0)
  627. collider111.Size = Vector3.new(1.5,1,1)
  628. collider111.Shape = "Cylinder"
  629. local weld111 = Instance.new("Weld", collider111)
  630. weld111.Part0 = leftarm
  631. weld111.Part1 = collider111
  632. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  633. collider111.TopSurface = "Smooth"
  634. collider111.BottomSurface = "Smooth"
  635. collider111.formFactor = "Symmetric"
  636. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  637. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  638. collider111.Transparency = 1
  639. ----------------
  640. sensoring = Instance.new("Part", clone.Torso)
  641. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  642. sensoring.CanCollide = false
  643. sensoring.Position = clone.Torso.Position
  644. local welder = Instance.new("Weld", sensoring)
  645. welder.Part0 = clone.Torso
  646. welder.Part1 = sensoring
  647. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  648. sensoring.Transparency = 1
  649. -----------------
  650. sensoring1 = Instance.new("Part", clone.Torso)
  651. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  652. sensoring1.CanCollide = false
  653. sensoring1.Position = clone.Torso.Position
  654. local welder1 = Instance.new("Weld", sensoring)
  655. welder1.Part0 = clone.Torso
  656. welder1.Part1 = sensoring1
  657. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  658. sensoring1.Transparency = 1
  659. end
  660. clone.Name = humanoid.Parent.Name.." (PANNED)"
  661. ded:Play()
  662. vel:destroy()
  663. wait(0.5)
  664. local function touch()
  665. if not using then
  666. using = true
  667. local Math = math.random(1,4)
  668. if Math == 1 then
  669. hit:Play()
  670. end
  671. if Math == 2 then
  672. hit1:Play()
  673. end
  674. if Math == 3 then
  675. hit2:Play()
  676. end
  677. if Math == 4 then
  678. hit3:Play()
  679. end
  680. wait(0.1)
  681. using = false
  682. end
  683. end
  684. sensoring.Touched:connect(touch)
  685. sensoring1.Touched:connect(touch)
  686. while true do
  687. if clone:findFirstChild("Head") then
  688. clone.Head.CanCollide = false
  689. end
  690. game:GetService("RunService").Stepped:wait()
  691. end
  692. end
  693. end
  694. end
  695. end
  696. Part0.Touched:connect(hittie)
  697. function ragdoll()
  698. game.Players.LocalPlayer.Character.Archivable = true
  699. clone = game.Players.LocalPlayer.Character:Clone()
  700. clone.Parent = workspace
  701. for i,v in pairs(clone:GetChildren()) do
  702. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  703. v:Remove()
  704. end
  705. for i,p in pairs(v:GetChildren()) do
  706. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  707. p:Remove()
  708. end
  709. end
  710. end
  711. for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  712. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  713. t:Remove()
  714. end
  715. end
  716. vel = Instance.new("BodyVelocity", clone.Torso)
  717. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  718. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  719. clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608"
  720. using = false
  721. hit = Instance.new("Sound", clone.Torso)
  722. hit.SoundId = "rbxassetid://260430060"
  723. hit.Volume = 0
  724. hit1 = Instance.new("Sound", clone.Torso)
  725. hit1.SoundId = "rbxassetid://138087186"
  726. hit1.Volume = 0
  727. hit2 = Instance.new("Sound", clone.Torso)
  728. hit2.SoundId = "rbxassetid://131237241"
  729. hit2.Volume = 0
  730. hit3 = Instance.new("Sound", clone.Torso)
  731. hit3.SoundId = "rbxassetid://278062209"
  732. hit3.Volume = 0
  733. hit3.TimePosition = 0.33
  734. ded = Instance.new("Sound", clone.Torso)
  735. ded.SoundId = "rbxassetid://337800380"
  736. ded.Volume = 5
  737. local leftarm = clone:findFirstChild("Left Arm")
  738. local rightrm = clone:findFirstChild("Right Arm")
  739. local leftleg = clone:findFirstChild("Left Leg")
  740. local rightleg = clone:findFirstChild("Right Leg")
  741. local head = clone:findFirstChild("Head")
  742. for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  743. if g.ClassName == "Part" then
  744. g:destroy()
  745. end
  746. end
  747. for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  748. if h.ClassName == "Accesory" then
  749. h:destroy()
  750. end
  751. end
  752. game.Workspace.CurrentCamera.CameraSubject = head
  753. if head then
  754. local attachment = Instance.new("Attachment", clone.Head)
  755. attachment.Position = Vector3.new(0, -0.5, 0)
  756. attachment.Name = "lol"
  757. attachment.Visible = false
  758. clone.Torso.NeckAttachment.Visible = false
  759. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  760. local ball = Instance.new("BallSocketConstraint", clone)
  761. ball.Attachment0 = clone.Torso.NeckAttachment
  762. ball.Attachment1 = attachment
  763. ball.LimitsEnabled = true
  764. ball.TwistLimitsEnabled = true
  765. ball.UpperAngle = 90
  766. ball.Restitution = 0.5
  767. ball.TwistUpperAngle = 90
  768. ball.TwistLowerAngle = -90
  769. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  770. collidepartofleftleg.Name = "Bone"
  771. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  772. collidepartofleftleg.Transparency = 1
  773. collidepartofleftleg:BreakJoints()
  774. local weeld = Instance.new("Weld", collidepartofleftleg)
  775. weeld.Part0 = collidepartofleftleg
  776. weeld.Part1 = clone["Head"]
  777. end
  778. if leftleg ~= nil then
  779. local glue = Instance.new("Glue", clone.Torso)
  780. glue.Part0 = clone.Torso
  781. glue.Part1 = leftleg
  782. glue.Name = "Left leg"
  783. local collider = Instance.new("Part", leftleg)
  784. collider.Position = Vector3.new(0,999,0)
  785. collider.Size = Vector3.new(1.5, 1, 1)
  786. collider.Shape = "Cylinder"
  787. local weld = Instance.new("Weld", collider)
  788. weld.Part0 = leftleg
  789. weld.Part1 = collider
  790. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  791. collider.TopSurface = "Smooth"
  792. collider.BottomSurface = "Smooth"
  793. collider.formFactor = "Symmetric"
  794. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  795. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  796. collider.Transparency = 1
  797. end
  798. ------------
  799. if rightleg ~= nil then
  800. local glue1 = Instance.new("Glue", clone.Torso)
  801. glue1.Part0 = clone.Torso
  802. glue1.Part1 = rightleg
  803. glue1.Name = "Right leg"
  804. local collider1 = Instance.new("Part", rightleg)
  805. collider1.Position = Vector3.new(0,999,0)
  806. collider1.Size = Vector3.new(1.5, 1, 1)
  807. collider1.Shape = "Cylinder"
  808. local weld1 = Instance.new("Weld", collider1)
  809. weld1.Part0 = rightleg
  810. weld1.Part1 = collider1
  811. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  812. collider1.TopSurface = "Smooth"
  813. collider1.BottomSurface = "Smooth"
  814. collider1.formFactor = "Symmetric"
  815. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  816. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  817. collider1.Transparency = 1
  818. end
  819. ------------
  820. if rightrm ~= nil then
  821. local glue11 = Instance.new("Glue", clone.Torso)
  822. glue11.Part0 = clone.Torso
  823. glue11.Part1 = rightrm
  824. glue11.Name = "Right shoulder"
  825. local collider11 = Instance.new("Part", rightrm)
  826. collider11.Position = Vector3.new(0,9999,0)
  827. collider11.Size = Vector3.new(1.5,1,1)
  828. collider11.Shape = "Cylinder"
  829. local weld11 = Instance.new("Weld", collider11)
  830. weld11.Part0 = rightrm
  831. weld11.Part1 = collider11
  832. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  833. collider11.TopSurface = "Smooth"
  834. collider11.BottomSurface = "Smooth"
  835. collider11.formFactor = "Symmetric"
  836. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  837. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  838. collider11.Transparency = 1
  839. end
  840. ------------
  841. if leftarm ~= nil then
  842. local glue111 = Instance.new("Glue", clone.Torso)
  843. glue111.Part0 = clone.Torso
  844. glue111.Part1 = leftarm
  845. glue111.Name = "Left shoulder"
  846. local collider111 = Instance.new("Part", leftarm)
  847. collider111.Position = Vector3.new(0,9999,0)
  848. collider111.Size = Vector3.new(1.5,1,1)
  849. collider111.Shape = "Cylinder"
  850. local weld111 = Instance.new("Weld", collider111)
  851. weld111.Part0 = leftarm
  852. weld111.Part1 = collider111
  853. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  854. collider111.TopSurface = "Smooth"
  855. collider111.BottomSurface = "Smooth"
  856. collider111.formFactor = "Symmetric"
  857. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  858. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  859. collider111.Transparency = 1
  860. ----------------
  861. sensoring = Instance.new("Part", clone.Torso)
  862. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  863. sensoring.CanCollide = false
  864. sensoring.Position = clone.Torso.Position
  865. local welder = Instance.new("Weld", sensoring)
  866. welder.Part0 = clone.Torso
  867. welder.Part1 = sensoring
  868. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  869. sensoring.Transparency = 1
  870. -----------------
  871. sensoring1 = Instance.new("Part", clone.Torso)
  872. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  873. sensoring1.CanCollide = false
  874. sensoring1.Position = clone.Torso.Position
  875. local welder1 = Instance.new("Weld", sensoring)
  876. welder1.Part0 = clone.Torso
  877. welder1.Part1 = sensoring1
  878. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  879. sensoring1.Transparency = 1
  880. end
  881. clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)"
  882. ded:Play()
  883. vel:destroy()
  884. wait(0.2)
  885. game.Debris:AddItem(clone,60)
  886. local function touch()
  887. if not using then
  888. using = true
  889. local Math = math.random(1,4)
  890. if Math == 1 then
  891. hit:Play()
  892. end
  893. if Math == 2 then
  894. hit1:Play()
  895. end
  896. if Math == 3 then
  897. hit2:Play()
  898. end
  899. if Math == 4 then
  900. hit3:Play()
  901. end
  902. wait(0.1)
  903. using = false
  904. end
  905. end
  906. sensoring.Touched:connect(touch)
  907. sensoring1.Touched:connect(touch)
  908. while true do
  909. clone.Head.CanCollide = false
  910. game:GetService("RunService").Stepped:wait()
  911. end
  912. end
  913.  
  914. game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll)
  915.  
  916. --di ent
  917. while true do
  918. if cananimate then
  919. if game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  920. for i = 0.1,0.3 , 0.008 do
  921. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  922. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53402293, 0.0594797134, 0.144087285, 0.997264206, 0.0707819909, 0.0213012099, -0.0739177391, 0.9549582, 0.287386209, 2.98023224e-08, -0.28817457, 0.957577825),i)
  923. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54035091, 0.0769848824, -0.170524538, 0.99592495, -0.0847774297, 0.0307573378, 0.090184398, 0.936214805, -0.339659303, 0, 0.341049016, 0.940045416),i)
  924. game:GetService("RunService").Stepped:wait()
  925. end
  926. end
  927. for i = 0.1,0.3 , 0.008 do
  928. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
  929. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53173375, 0.0903658867, -0.222393572, 0.997264206, 0.0662034005, -0.0328776538, -0.0739177391, 0.893185973, -0.443570435, 2.98023224e-08, 0.444787204, 0.895636141),i)
  930. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54079688, 0.0720610619, 0.156226337, 0.99592495, -0.085669145, -0.0281783342, 0.090184398, 0.946062148, 0.311179608, 0, -0.312452823, 0.949932992),i)
  931. game:GetService("RunService").Stepped:wait()
  932. end
  933. end
  934. elseif game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 then
  935. for i = 0,1 , 0.1 do
  936. if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 and cananimate then
  937. weld.C0 = weld.C0:lerp(CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0),i)
  938. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i)
  939. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i)
  940. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
  941. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i)
  942. game:GetService("RunService").RenderStepped:wait()
  943. end
  944. end
  945. end
  946. end
  947. wait()
  948. end
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960. --[[-[CUBE OF POLARIS]-----
  961. This cube was created by TheHeadIessHorseman
  962. This cube was also TheHeadIessHorsemans first script on SB that was created with Sine and lerp
  963.  
  964. KEYDOWNS:
  965. B = FREEZE MODE ( Slows )
  966. N = HEAL MODE
  967. M = DARKNESS MODE ( ACTIVATED T ABILITY )
  968. Q = SPINNING CUBE ( DMGS WITH FREEZE/HEALS WITH HEAL MODE )
  969. E = DISINERGRATE
  970. F = TELEPORT ( PRESS F OVER PLAYER AND CLICK LOCATION )
  971. T = BLACK HOLE ( DARNKESS )
  972. --[ ---------------- ]]----
  973. local Player = game:GetService("Players").LocalPlayer
  974. repeat wait(1) until Player.Character
  975. local Character = Player.Character
  976. local la = Character:FindFirstChild("Left Arm")
  977. local ra = Character:FindFirstChild("Right Arm")
  978. local ll = Character:FindFirstChild("Left Leg")
  979. local rl = Character:FindFirstChild("Right Leg")
  980. local Torso = Character:FindFirstChild("Torso")
  981. local Humanoid = Character:findFirstChild("Humanoid")
  982. Character.Animate:Destroy()
  983. Humanoid.Animator:Destroy()
  984.  
  985. local LimbAccess = {LA=true,RA=true,LL=true,RL=true,RJ=true,NJ=true,Ring=true}
  986.  
  987. local State = "Normal"
  988. local Active = true
  989. local Mode = "Polaris"
  990. local mousepos = CFrame.new(0,0,0)
  991.  
  992. function Lerp(a,b,i) -- A = First pos, B = Second Pos, i = Speed
  993. return a:lerp(b,i)
  994. end
  995.  
  996. --Basically it works like this, a is the first position, and b is the position you want to reach. i is the slowness or smoothness factor.
  997. --They're usually labled x1,y1,alpha
  998.  
  999. Left_Arm = Instance.new("Weld",Torso)
  1000. Left_Arm.Part0 = Torso
  1001. Left_Arm.Part1 = la
  1002. Left_Arm.Name = "LeftArmJ"
  1003. Left_Arm.C0 = CFrame.new(-1.5,0.5,0)
  1004. Left_Arm.C1 = CFrame.new(0,0.5,0)
  1005. Right_Arm = Instance.new("Weld",Torso)
  1006. Right_Arm.Part0 = Torso
  1007. Right_Arm.Part1 = ra
  1008. Right_Arm.Name = "RightArmJ"
  1009. Right_Arm.C0 = CFrame.new(1.5,0.5,0)
  1010. Right_Arm.C1 = CFrame.new(0,0.5,0)
  1011. Left_Leg = Instance.new("Weld",Torso)
  1012. Left_Leg.Part0 = Torso
  1013. Left_Leg.Part1 = ll
  1014. Left_Leg.Name = "LeftLegJ"
  1015. Left_Leg.C0 = CFrame.new(-0.5,-1,0)
  1016. Left_Leg.C1 = CFrame.new(0,1,0)
  1017. Right_Leg = Instance.new("Weld",Torso)
  1018. Right_Leg.Name = "RightLegJ"
  1019. Right_Leg.Part0 = Torso
  1020. Right_Leg.Part1 = rl
  1021. Right_Leg.C0 = CFrame.new(0.5,-1,0)
  1022. Right_Leg.C1 = CFrame.new(0,1,0)
  1023.  
  1024. local RootJoint = Instance.new("Weld",Character["HumanoidRootPart"])
  1025. RootJoint.Name = "RootJ"
  1026. RootJoint.Part0 = Character["HumanoidRootPart"]
  1027. RootJoint.Part1 = Torso
  1028.  
  1029. local NeckJ = Instance.new("Weld",Torso)
  1030. NeckJ.Name = "NeckJ"
  1031. NeckJ.Part0 = Torso
  1032. NeckJ.Part1 = Character.Head
  1033. NeckJ.C1 = CFrame.new(0,-1.5,0)
  1034.  
  1035. local Model = Instance.new("Model",Character)
  1036. Model.Name = "RingModel"
  1037. local RingSize = Vector3.new(.5,.5,.5)
  1038. local Ring = Instance.new("Part",Model)
  1039. Ring.Name = "Ring"
  1040. Ring.FormFactor = "Custom"
  1041. Ring.Size = RingSize
  1042. Ring.Anchored = true
  1043. Ring.CanCollide = false
  1044. Ring.BrickColor = BrickColor.new("Bright orange")
  1045. Ring.Material = "Neon"
  1046. Ring.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  1047. Ring.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  1048. Ring.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  1049. Ring.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  1050. Ring.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  1051. Ring.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  1052.  
  1053. local RingClone = Ring:Clone()
  1054.  
  1055. local Sphere = Instance.new("Part")
  1056. Sphere.Shape = "Ball"
  1057. Sphere.Name = "Bound"
  1058. Sphere.Anchored = true
  1059. Sphere.BrickColor = BrickColor.new("Really black")
  1060. Sphere.Transparency = .8
  1061. Sphere.Material = "Neon"
  1062.  
  1063. function CreateRegion3FromLocAndSize(Position, Size)
  1064. local SizeOffset = Size/2
  1065. local Point1 = Position - SizeOffset
  1066. local Point2 = Position + SizeOffset
  1067. return Region3.new(Point1, Point2)
  1068. end
  1069.  
  1070. function ModeAccess(MODE)
  1071. local Colors = {
  1072. Freeze=BrickColor.new("Pastel light blue");
  1073. Polaris=BrickColor.new("Bright orange");
  1074. Hearth=BrickColor.new("Pastel brown");
  1075. Darkness=BrickColor.new("Really black");
  1076. }
  1077. local Mats = {
  1078. Freeze = "Ice";
  1079. Polaris = "Neon";
  1080. Hearth="Neon";
  1081. Darkness="Neon";
  1082. }
  1083. local Refl = {
  1084. Freeze = .35;
  1085. Polaris = 0;
  1086. Hearth=0;
  1087. Darkness=0;
  1088. }
  1089. LimbAccess.LL = false
  1090. LimbAccess.LA = false
  1091. LimbAccess.RA = false
  1092. LimbAccess.RL = false
  1093. LimbAccess.NJ = false
  1094. LimbAccess.Ring = false
  1095. LimbAccess.RJ = false
  1096. Character.Humanoid.WalkSpeed = 0
  1097. local angle = 0
  1098. local angles = 1
  1099. for i = 1,6,.1 do
  1100. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(0,0,0),.1)
  1101. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  1102. NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,.5,-1)*CFrame.Angles(math.rad(45),0,0),.25)
  1103. Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,-1,0)*CFrame.Angles(0,0,math.rad(-2)),.1)
  1104. Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,-1,0)*CFrame.Angles(0,0,math.rad(2)),.1)
  1105. Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(-5),math.rad(0)),.03)
  1106. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.03)
  1107. game:GetService("RunService").RenderStepped:wait()
  1108. end
  1109. for i = 1,6,.1 do
  1110. angle = (angle % 100) + angles/10
  1111. Ring.Size = Lerp(Ring.Size,Vector3.new(5,5,5),.04)
  1112. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  1113. Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(-5),math.rad(25)),.03)
  1114. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
  1115. game:GetService("RunService").RenderStepped:wait()
  1116. end
  1117. coroutine.resume(coroutine.create(function()
  1118. for i = 0,1,.04 do
  1119. Ring.Transparency = i
  1120. game:GetService("RunService").RenderStepped:wait()
  1121. end
  1122. end))
  1123. for i = 1,6,.1 do
  1124. angle = (angle % 100) + angles/10
  1125. Ring.Size = Lerp(Ring.Size,Vector3.new(0,0,0),.04)
  1126. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  1127. Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(5)),.03)
  1128. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(0)),.08)
  1129. game:GetService("RunService").RenderStepped:wait()
  1130. end
  1131. coroutine.resume(coroutine.create(function()
  1132. for i = 1,0,-.04 do
  1133. Ring.Transparency = i
  1134. game:GetService("RunService").RenderStepped:wait()
  1135. end
  1136. end))
  1137. Ring.BrickColor = Colors[MODE]
  1138. Ring.Material = Mats[MODE]
  1139. Ring.Reflectance = Refl[MODE]
  1140. for i = 1,6,.1 do
  1141. angle = (angle % 100) + angles/10
  1142. Ring.Size = Lerp(Ring.Size,Vector3.new(2,2,2),.04)
  1143. Ring.CFrame = Lerp(Ring.CFrame,Character.Torso.CFrame*CFrame.new(0,3.5,0)*CFrame.Angles(0,angle,0),.1)
  1144. Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(180),math.rad(-5),math.rad(25)),.03)
  1145. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(180),0,math.rad(-25)),.08)
  1146. game:GetService("RunService").RenderStepped:wait()
  1147. end
  1148. Ring.Transparency = 0
  1149. Mode = MODE
  1150. LimbAccess.LL = true
  1151. LimbAccess.LA = true
  1152. LimbAccess.RA = true
  1153. LimbAccess.RL = true
  1154. LimbAccess.NJ = true
  1155. LimbAccess.Ring = true
  1156. LimbAccess.RJ = true
  1157. end
  1158.  
  1159. function Dmg(hit)
  1160. local DB = false
  1161.  
  1162. for i,v in ipairs(game.Workspace:FindPartsInRegion3(hit,nil,80)) do
  1163. if v and v.Parent and v.Parent:FindFirstChild("Head") and v.Parent.Name ~= Player.Name then
  1164. if v.Parent:FindFirstChild("Humanoid") and Mode == "Freeze" then
  1165. v.Parent:FindFirstChild("Humanoid"):TakeDamage(v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
  1166. elseif v.Parent:FindFirstChild("Humanoid") and Mode == "Hearth" then
  1167. v.Parent:FindFirstChild("Humanoid").Health = v.Parent:FindFirstChild("Humanoid").Health + (v.Parent:FindFirstChild("Humanoid").MaxHealth*.0006)
  1168. end
  1169.  
  1170. if v.Parent and DB == false then
  1171. DB = true
  1172. for index,object in pairs(v.Parent:GetChildren()) do
  1173. if (object.ClassName == "Humanoid" and object.MaxHealth == math.huge) or (object.ClassName == "Humanoid" and object.ClassName ~= object.Name) then
  1174. object:Destroy()
  1175. break
  1176. end
  1177. end
  1178. end
  1179.  
  1180. if Mode == "Freeze" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") and v.Parent:FindFirstChild("Body Colors") then
  1181. v.Parent:FindFirstChild("Humanoid").WalkSpeed = 3
  1182. local F = Instance.new("Folder",v.Parent)
  1183. F.Name = "BCOLORS"
  1184.  
  1185. v.Parent:FindFirstChild("Body Colors").Parent = F
  1186. coroutine.resume(coroutine.create(function()
  1187. wait(1)
  1188. for i,v in pairs(v.Parent:GetChildren()) do
  1189. if v:IsA("Part") then
  1190. v.BrickColor = BrickColor.new("Pastel light blue")
  1191. end
  1192. end
  1193. end))
  1194. end
  1195. if Mode == "Polaris" and v and v.Parent and v.Parent:FindFirstChild("Humanoid") then
  1196. v.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
  1197. coroutine.resume(coroutine.create(function()
  1198. wait(1)
  1199. if v.Parent and v.Parent:FindFirstChild("BCOLORS") then
  1200. v.Parent:FindFirstChild("BCOLORS")["Body Colors"].Parent = v.Parent
  1201. v.Parent:FindFirstChild("BCOLORS"):Destroy()
  1202. end
  1203. end))
  1204. end
  1205.  
  1206. end
  1207. end
  1208. --[[if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= Player.Name then
  1209. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
  1210. end]]--
  1211. end
  1212. Player:GetMouse().KeyDown:connect(function(key)
  1213. local h=Player:GetMouse().Hit*CFrame.new(0,5,0)
  1214. local a = 0
  1215. local a2 = 0
  1216. local as = .5
  1217. local as2 = 600
  1218. if key == "t" and Active == true and Mode == "Darkness" then
  1219. Active = false
  1220. LimbAccess.Ring = false
  1221. for i = 0,6,.1 do
  1222. Ring.CFrame = Lerp(Ring.CFrame,h,.1)
  1223. game:GetService("RunService").RenderStepped:wait()
  1224. end
  1225. local news = Sphere:Clone()
  1226. news.CanCollide = false
  1227. repeat wait() until Character:FindFirstChild("RingModel")
  1228. news.Parent = Character.RingModel
  1229. news.Size = Vector3.new(100,100,100)
  1230. news.CFrame = Ring.CFrame
  1231. local CF = Ring.CFrame
  1232. coroutine.resume(coroutine.create(function()
  1233. for i = 0,40,.1 do
  1234. a = (a % 100) + as/10
  1235. a2 = (a2 % 100) + as/10
  1236. Ring.Size = Lerp(Ring.Size,Vector3.new(3+math.sin(a2)*1,3+math.sin(a2)*1.5,3+math.sin(a2)*2),.1)
  1237. Ring.CFrame = h*CFrame.Angles(a,0,a)
  1238. news.Size = Lerp(news.Size,Vector3.new(100+math.sin(a2)*1,100+math.sin(a2)*1,100+math.sin(a2)*1),.1)
  1239. news.CFrame = CF
  1240. news.Transparency = .5+(math.sin(a)*.5)
  1241. game:GetService("RunService").RenderStepped:wait()
  1242. end
  1243. end))
  1244. for i = 1,40,.1 do
  1245. for i,v in pairs(game.Players:GetChildren()) do
  1246. if v and v:IsA("Player") and v.Character ~= nil and v.Character:FindFirstChild("Torso") then
  1247. if v and v.Character and v.Character:FindFirstChild("Torso") and v.Name ~= Player.Name then
  1248. if v and v.Character and v.Character.Torso and not v.Character.Torso:FindFirstChild("BOD") and (v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude < 50 then
  1249. local V = Instance.new("BodyVelocity",v.Character.Torso)
  1250. V.Name = "BOD"
  1251. V.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  1252. end
  1253. if v and v.Character and v.Character:FindFirstChild("Torso") and (v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude < 50 and v.Name ~= Player.Name then
  1254. v.Character.Torso:FindFirstChild("BOD"). Velocity = CFrame.new(v.Character.Torso.CFrame.p,Ring.CFrame.p).lookVector*(v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude
  1255. if v and v.Character and v.Character:FindFirstChild("Torso") and (v.Character.Torso.CFrame.p - Ring.CFrame.p).magnitude < 5 and v.Character:FindFirstChild("Humanoid") then
  1256. v.Character:FindFirstChild("Humanoid").Health = v.Character:FindFirstChild("Humanoid").Health - (v.Character:FindFirstChild("Humanoid").MaxHealth*.006)
  1257. end
  1258. end
  1259. end
  1260. end
  1261. end
  1262. game:GetService("RunService").RenderStepped:wait()
  1263. end
  1264. for i,v in pairs(game.Players:GetChildren()) do
  1265. if v and v:IsA("Player") and v.Character and v.Character:FindFirstChild("Torso") and v.Character.Torso:FindFirstChild("BOD") then
  1266. v.Character.Torso:FindFirstChild("BOD"):Destroy()
  1267. end
  1268. end
  1269. for i = news.Transparency,1,-.01 do
  1270. news.Transparency = i
  1271. game:GetService("RunService").RenderStepped:wait()
  1272. end
  1273. LimbAccess.Ring = true
  1274. Active = true
  1275. news:Destroy()
  1276. end
  1277. end)
  1278. Player:GetMouse().KeyDown:connect(function(key)
  1279. local angle = 0
  1280. local anglespeed = 1
  1281. if key == "q" and Active == true then
  1282. Active = false
  1283. LimbAccess.Ring = false
  1284. local x,y,z = 50,50,50
  1285. local pos = Player:GetMouse().Hit
  1286. for i = 0,1,.01 do
  1287. angle = (angle % 100) + anglespeed/10
  1288. Ring.Size = Lerp(Ring.Size,Vector3.new(x,y,z),.05)
  1289. Ring.CFrame = Ring.CFrame:lerp((CFrame.new(pos.p.x,pos.p.y,pos.p.z)*CFrame.new(0,y/2,0)*CFrame.Angles(0,angle,0)),i)
  1290. game:GetService("RunService").RenderStepped:wait()
  1291. end
  1292. for i = 1,10,.1 do
  1293. local reg = CreateRegion3FromLocAndSize(pos.p,Vector3.new(x,y,z))
  1294. Dmg(reg,Mode)
  1295.  
  1296. angle = (angle % 100) + anglespeed/10
  1297. Ring.CFrame = CFrame.new(pos.p.x,pos.p.y,pos.p.z)*CFrame.new(0,y/2,0)*CFrame.Angles(0,angle,0)
  1298. game:GetService("RunService").RenderStepped:wait()
  1299. end
  1300. LimbAccess.Ring = true
  1301. wait(.5)
  1302. Active = true
  1303. end
  1304. end)
  1305. Player:GetMouse().KeyDown:connect(function(key)
  1306.  
  1307. if key == "b" and Active == true then
  1308. Active = false
  1309. ModeAccess("Freeze")
  1310. wait(1)
  1311. Active = true
  1312. Character.Humanoid.WalkSpeed = 16
  1313. elseif key == "p" and Active == true then
  1314. Active = false
  1315. ModeAccess("Polaris")
  1316. wait(1)
  1317. Active = true
  1318. Character.Humanoid.WalkSpeed = 16
  1319. elseif key == "n" and Active == true then
  1320. Active = false
  1321. ModeAccess("Hearth")
  1322. wait(1)
  1323. Active = true
  1324. Character.Humanoid.WalkSpeed = 16
  1325. elseif key == "m" and Active == true then
  1326. Active = false
  1327. ModeAccess("Darkness")
  1328. wait(1)
  1329. Active = true
  1330. Character.Humanoid.WalkSpeed = 16
  1331. end
  1332. end)
  1333.  
  1334. Player:GetMouse().KeyDown:connect(function(key)
  1335. local Object = Player:GetMouse().Target
  1336. if key == "e" and Active == true and Object:IsA("Part") and Object.Name ~= "BasePlate" and Object.Name ~= "Baseplate" and Object.Name ~= "Base" then
  1337. Active = false
  1338. LimbAccess.Ring = false
  1339. for i = 0,1,.01 do
  1340. Ring.Size = Ring.Size:lerp(Object.Size+Vector3.new(.5,.5,.5),i)
  1341. Ring.CFrame = Ring.CFrame:lerp(Object.CFrame,i)
  1342. game:GetService("RunService").RenderStepped:wait()
  1343. end
  1344. for i = 0,.5,.01 do
  1345. Ring.Size = Object.Size+Vector3.new(.5,.5,.5)
  1346. Ring.CFrame = Object.CFrame
  1347. game:GetService("RunService").RenderStepped:wait()
  1348. end
  1349. Object:Destroy()
  1350. wait(.5)
  1351. LimbAccess.Ring = true
  1352. Active = true
  1353. end
  1354. end)
  1355. Player:GetMouse().KeyDown:connect(function(key)
  1356. local H = Player:GetMouse().Target
  1357. if key == "f" and Active == true and H and H.Parent and H.Parent:FindFirstChild("Torso") then
  1358. LimbAccess.Ring = false
  1359. Active = false
  1360. Ring.Anchored = true
  1361. for i = 0,1,.01 do
  1362. Ring.Size = Ring.Size:lerp(Vector3.new(4.5,6,2),i)
  1363. Ring.CFrame = Ring.CFrame:lerp(H.Parent.Torso.CFrame,i)
  1364. game:GetService("RunService").RenderStepped:wait()
  1365. end
  1366. Ring.Anchored = true
  1367. H.Parent.Torso.Anchored = true
  1368. for i = 0,1,.01 do
  1369. Ring.CFrame = Ring.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
  1370. Ring.CanCollide = false
  1371. H.Parent.HumanoidRootPart.CFrame = H.Parent.HumanoidRootPart.CFrame:lerp(mousepos*CFrame.new(0,2,0),i)
  1372. H.Parent.Torso.Velocity = Vector3.new(0,0,0)
  1373. game:GetService("RunService").RenderStepped:wait()
  1374. end
  1375. H.Parent.Torso.Anchored = false
  1376. Ring.Anchored = true
  1377. LimbAccess.Ring = true
  1378. H.Parent.Humanoid.WalkSpeed = 16
  1379. wait(.7)
  1380. Active = true
  1381. end
  1382. end)
  1383.  
  1384.  
  1385.  
  1386. Player:GetMouse().Button1Down:connect(function()
  1387. mousepos = Player:GetMouse().Hit
  1388. end)
  1389.  
  1390.  
  1391. angle = 0
  1392. angle2 = 0
  1393. angle3 = 0
  1394. anglespeed = 2
  1395. anglespeed2 = 1
  1396. anglespeed3 = .4
  1397. game:GetService("RunService").Stepped:connect(function()
  1398. angle = ((angle % 100) + anglespeed/10)
  1399. angle2 = ((angle2 % 100) + anglespeed2/10)
  1400. angle3 = ((angle3 % 100) + anglespeed3/10) --it'll go from 0 to 100 and repeat in a loop. basically it will get to its destination and back --ok
  1401. if Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude < 2 and State == "Normal" then -- idle
  1402. if LimbAccess.RJ then
  1403. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.5,0,0)*CFrame.Angles(math.sin(angle3)*.02,math.rad(-45),0),.2)
  1404. end
  1405. if LimbAccess.LA then
  1406. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(97)+(math.sin(angle3))*-.05,0,math.rad(-25)),.1)
  1407. end
  1408. if LimbAccess.NJ then
  1409. NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,0,0)*CFrame.Angles(math.sin(-angle3)*.04,math.rad(45)+(math.sin(-angle3)*.04),0),.25)
  1410. end
  1411. if LimbAccess.RA then
  1412. Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(50)+(math.sin(angle3)*.1),math.rad(-20),math.rad(30)),.1)
  1413. end
  1414. if LimbAccess.LL then
  1415. Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,-1,0)*CFrame.Angles(0,0,math.rad(-5)+math.sin(angle3)*.02),.1)
  1416. end
  1417. if LimbAccess.RL then
  1418. Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,-1,0)*CFrame.Angles(0,0,math.rad(15)+math.sin(angle3)*-.02),.1)
  1419. end
  1420. if LimbAccess.Ring then
  1421. Ring.CFrame = Lerp(Ring.CFrame,ra.CFrame*CFrame.new(0,-1.1+math.sin(angle2)*.2,-1)*CFrame.Angles(math.rad(40)+angle2,angle2,angle2),.04)
  1422. Ring.Size = Lerp(Ring.Size,RingSize,.06)
  1423. end
  1424. elseif Vector3.new(Torso.Velocity.x,0,Torso.Velocity.z).magnitude > 2 and State == "Normal" then -- walk
  1425. if LimbAccess.RJ then
  1426. RootJoint.C0 = Lerp(RootJoint.C0,CFrame.new(-.2,math.sin(angle2)*.1,0)*CFrame.Angles(0,math.rad(45),0),.2)
  1427. end
  1428. if LimbAccess.LA then
  1429. Left_Arm.C0 = Lerp(Left_Arm.C0,CFrame.new(-1.2,0.35,0)*CFrame.Angles(math.rad(-25)+math.sin(angle3)*.06,0+math.sin(angle3)*.06,math.rad(15)+math.sin(angle3)*.06),.1)
  1430. end
  1431. if LimbAccess.NJ then
  1432. NeckJ.C0 = Lerp(NeckJ.C0,CFrame.new(0,0,0)*CFrame.Angles(math.sin(-angle3)*.04,math.rad(-45)+(math.sin(-angle3)*.04),0),.25)
  1433. end
  1434. if LimbAccess.RA then
  1435. Right_Arm.C0 = Lerp(Right_Arm.C0,CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(90)+math.sin(angle3)*.05,0,math.rad(40)),.1)
  1436. end
  1437. if LimbAccess.LL then
  1438. Left_Leg.C0 = Lerp(Left_Leg.C0,CFrame.new(-0.5,(math.sin(angle3)*.1)-.6,-.2)*CFrame.Angles(math.rad(-15)+(math.sin(angle3)*.1),0,math.rad(-5)),.1)
  1439. end
  1440. if LimbAccess.RL then
  1441. Right_Leg.C0 = Lerp(Right_Leg.C0,CFrame.new(0.5,(math.sin(angle3)*.1)-.7,-.1)*CFrame.Angles(math.rad(-15)+(math.sin(angle3)*.1),0,math.rad(5)),.1)
  1442. end
  1443. if LimbAccess.Ring then
  1444. local var = math.sin(angle2)*1
  1445. Ring.Size = Lerp(Ring.Size,Vector3.new(2+var,2+var,2+var),.06)
  1446. Ring.CFrame = Lerp(Ring.CFrame,CFrame.new((ra.CFrame*CFrame.new(0,-3,-.3)).p,Player:GetMouse().hit.p),.8)
  1447. Ring.Velocity = Vector3.new(0,0,0)
  1448. end
  1449. end
  1450. if not Character:FindFirstChild("RingModel") or not Character:FindFirstChild("RingModel"):FindFirstChild("Ring") then
  1451. Mode = "Polaris"
  1452. if Character:FindFirstChild("RingModel") then
  1453. local NewRing = RingClone:Clone()
  1454. Ring = NewRing
  1455. Ring.Parent = Character:FindFirstChild("RingModel")
  1456. else
  1457. local Model = Instance.new("Model",Character)
  1458. Model.Name = "RingModel"
  1459. local NewRing = RingClone:Clone()
  1460. Ring = NewRing
  1461. Ring.Parent = Model
  1462. end
  1463. end
  1464. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement