Advertisement
Guest User

TEST

a guest
Oct 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.04 KB | None | 0 0
  1. --[[
  2.  
  3.  
  4.  
  5.  
  6. Hello there... if you logged this then can you plz still give me credit for making this
  7. I'm sorry, i couldn't help it...
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. --]]
  15. wait(1 / 60)
  16. Effects = { }
  17. local Player = game.Players.ErayBeyC
  18. local Character = Player.Character
  19. local Humanoid = Character.Humanoid
  20. local LeftArm = Character["Left Arm"]
  21. local RightArm = Character["Right Arm"]
  22. local LeftLeg = Character["Left Leg"]
  23. local RightLeg = Character["Right Leg"]
  24. local Head = Character.Head
  25. local Torso = Character.Torso
  26. local cam = game.Workspace.CurrentCamera
  27. local RootPart = Character.HumanoidRootPart
  28. local RootJoint = RootPart.RootJoint
  29. local equipped = false
  30. local attack = false
  31. local Anim = 'Idle'
  32. local idle = 0
  33. local attacktype = 1
  34. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  35. local velocity = RootPart.Velocity.y
  36. local sine = 0
  37. local change = 1
  38. local grabbed = false
  39. local cn = CFrame.new
  40. local mr = math.rad
  41. local angles = CFrame.Angles
  42. local ud = UDim2.new
  43. local c3 = Color3.new
  44. local autofind = false
  45. game.Players.LocalPlayer.Character.Sound:Destroy()
  46. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  47. Humanoid.Animator:Destroy()
  48. Character.Animate:Destroy()
  49. EFS = Instance.new("Sound")
  50. EFS.Parent = Torso
  51. EFS.SoundId = "rbxassetid://"
  52. EFS.Volume = 4
  53. EFS.Looped = false
  54. EFS:Play()
  55. EFS2 = Instance.new("Sound")
  56. EFS2.Parent = Torso
  57. EFS2.SoundId = "rbxassetid://177339878"
  58. EFS2.Volume = 0.2
  59. EFS2.Looped = true
  60. EFS2:Play()
  61. EFS3 = Instance.new("Sound")
  62. EFS3.Parent = Torso
  63. EFS3.SoundId = "rbxassetid://585364476"
  64. EFS3.Volume = 0.8
  65. EFS3.Looped = false
  66.  
  67. local naeeym2 = IN("BillboardGui",Char)
  68. naeeym2.AlwaysOnTop = true
  69. naeeym2.Size = UDim2.new(5,35,2,15)
  70. naeeym2.StudsOffset = V3.N(0,2.5,0)
  71. naeeym2.Adornee = Char.Head
  72. naeeym2.Name = "Name"
  73. naeeym2.PlayerToHideFrom = Nobody
  74. local tecks2 = IN("TextLabel",naeeym2)
  75. tecks2.BackgroundTransparency = 1
  76. tecks2.TextScaled = true
  77. tecks2.BorderSizePixel = 0
  78. tecks2.Text = "By ErayBeyC"
  79. tecks2.Font = Enum.Font.Bodoni
  80. tecks2.TextSize = 30
  81. tecks2.TextStrokeTransparency = 0
  82. tecks2.TextColor3 = C3.N(0,0,0)
  83. tecks2.TextStrokeColor3 = C3.N(.7,0,0)
  84. tecks2.Size = UDim2.new(1,0,0.5,0)
  85. tecks2.Parent = naeeym2
  86.  
  87. local naeeym2 = IN("BillboardGui",Char)
  88. naeeym2.AlwaysOnTop = true
  89. naeeym2.Size = UDim2.new(5,35,2,15)
  90. naeeym2.StudsOffset = V3.N(0,3.5,0)
  91. naeeym2.Adornee = Char.Head
  92. naeeym2.Name = "Name"
  93. naeeym2.PlayerToHideFrom = Nobody
  94. local tecks2 = IN("TextLabel",naeeym2)
  95. tecks2.BackgroundTransparency = 1
  96. tecks2.TextScaled = true
  97. tecks2.BorderSizePixel = 0
  98. tecks2.Text = "SCP-106"
  99. tecks2.Font = Enum.Font.Bodoni
  100. tecks2.TextSize = 30
  101. tecks2.TextStrokeTransparency = 0
  102. tecks2.TextColor3 = C3.N(0,0,0)
  103. tecks2.TextStrokeColor3 = C3.N(.7,0,0)
  104. tecks2.Size = UDim2.new(1,0,0.5,0)
  105. tecks2.Parent = naeeym2
  106.  
  107.  
  108.  
  109. ATS = Instance.new("Sound")
  110. ATS.Parent = Torso
  111. ATS.SoundId = "rbxassetid://347611423"
  112. ATS.Volume = 2
  113. ATS.Looped = false
  114.  
  115.  
  116. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  117. ff.Visible = false
  118.  
  119.  
  120. Character.Humanoid.WalkSpeed = 3
  121.  
  122.  
  123.  
  124. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  125. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  126. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  127.  
  128. RSH, LSH = nil, nil
  129.  
  130. RW = Instance.new("Weld")
  131. LW = Instance.new("Weld")
  132.  
  133. RH = Torso["Right Hip"]
  134. LH = Torso["Left Hip"]
  135.  
  136. RSH = Torso["Right Shoulder"]
  137. LSH = Torso["Left Shoulder"]
  138.  
  139. RSH.Parent = nil
  140. LSH.Parent = nil
  141.  
  142. RW.Name = "RW"
  143. RW.Part0 = Torso
  144. RW.C0 = cn(1.5, 0.5, 0)
  145. RW.C1 = cn(0, 0.5, 0)
  146. RW.Part1 = RightArm
  147. RW.Parent = Torso
  148.  
  149. LW.Name = "LW"
  150. LW.Part0 = Torso
  151. LW.C0 = cn(-1.5, 0.5, 0)
  152. LW.C1 = cn(0, 0.5, 0)
  153. LW.Part1 = LeftArm
  154. LW.Parent = Torso
  155.  
  156. function clerp(a, b, t)
  157. local qa = {
  158. QuaternionFromCFrame(a)
  159. }
  160. local qb = {
  161. QuaternionFromCFrame(b)
  162. }
  163. local ax, ay, az = a.x, a.y, a.z
  164. local bx, by, bz = b.x, b.y, b.z
  165. local _t = 1 - t
  166. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  167. end
  168.  
  169. function QuaternionFromCFrame(cf)
  170. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  171. local trace = m00 + m11 + m22
  172. if trace > 0 then
  173. local s = math.sqrt(1 + trace)
  174. local recip = 0.5 / s
  175. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  176. else
  177. local i = 0
  178. if m11 > m00 then
  179. i = 1
  180. end
  181. if m22 > (i == 0 and m00 or m11) then
  182. i = 2
  183. end
  184. if i == 0 then
  185. local s = math.sqrt(m00 - m11 - m22 + 1)
  186. local recip = 0.5 / s
  187. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  188. elseif i == 1 then
  189. local s = math.sqrt(m11 - m22 - m00 + 1)
  190. local recip = 0.5 / s
  191. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  192. elseif i == 2 then
  193. local s = math.sqrt(m22 - m00 - m11 + 1)
  194. local recip = 0.5 / s
  195. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  196. end
  197. end
  198. end
  199.  
  200. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  201. local xs, ys, zs = x + x, y + y, z + z
  202. local wx, wy, wz = w * xs, w * ys, w * zs
  203. local xx = x * xs
  204. local xy = x * ys
  205. local xz = x * zs
  206. local yy = y * ys
  207. local yz = y * zs
  208. local zz = z * zs
  209. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  210. end
  211.  
  212. function QuaternionSlerp(a, b, t)
  213. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  214. local startInterp, finishInterp;
  215. if cosTheta >= 0.0001 then
  216. if (1 - cosTheta) > 0.0001 then
  217. local theta = math.acos(cosTheta)
  218. local invSinTheta = 1 / math.sin(theta)
  219. startInterp = math.sin((1 - t) * theta) * invSinTheta
  220. finishInterp = math.sin(t * theta) * invSinTheta
  221. else
  222. startInterp = 1 - t
  223. finishInterp = t
  224. end
  225. else
  226. if (1 + cosTheta) > 0.0001 then
  227. local theta = math.acos(-cosTheta)
  228. local invSinTheta = 1 / math.sin(theta)
  229. startInterp = math.sin((t - 1) * theta) * invSinTheta
  230. finishInterp = math.sin(t * theta) * invSinTheta
  231. else
  232. startInterp = t - 1
  233. finishInterp = t
  234. end
  235. end
  236. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  237. end
  238.  
  239. function swait(num)
  240. if num == 0 or num == nil then
  241. game:service'RunService'.RenderStepped:wait(0)
  242. else
  243. for i = 0, num do
  244. game:service'RunService'.RenderStepped:wait(0)
  245. end
  246. end
  247. end
  248.  
  249. local RbxUtility = LoadLibrary("RbxUtility")
  250. local Create = RbxUtility.Create
  251.  
  252. function RemoveOutlines(part)
  253. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  254. end
  255.  
  256. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  257. local Part = Create("Part"){
  258. formFactor = FormFactor,
  259. Parent = Parent,
  260. Reflectance = Reflectance,
  261. Transparency = Transparency,
  262. CanCollide = false,
  263. Locked = true,
  264. BrickColor = BrickColor.new(tostring(BColor)),
  265. Name = Name,
  266. Size = Size,
  267. Material = Material,
  268. }
  269. RemoveOutlines(Part)
  270. return Part
  271. end
  272.  
  273. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  274. local Msh = Create(Mesh){
  275. Parent = Part,
  276. Offset = OffSet,
  277. Scale = Scale,
  278. }
  279. if Mesh == "SpecialMesh" then
  280. Msh.MeshType = MeshType
  281. Msh.MeshId = MeshId
  282. end
  283. return Msh
  284. end
  285.  
  286. function CreateWeld(Parent, Part0, Part1, C0, C1)
  287. local Weld = Create("Weld"){
  288. Parent = Parent,
  289. Part0 = Part0,
  290. Part1 = Part1,
  291. C0 = C0,
  292. C1 = C1,
  293. }
  294. return Weld
  295. end
  296.  
  297. function rayCast(Position, Direction, Range, Ignore)
  298. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  299. end
  300.  
  301. function CreateSound(id, par, vol, pit)
  302. coroutine.resume(coroutine.create(function()
  303. local sou = Instance.new("Sound", par or workspace)
  304. sou.Volume = vol
  305. sou.Pitch = pit or 1
  306. sou.SoundId = id
  307. wait()
  308. sou:play()
  309. game:GetService("Debris"):AddItem(sou, 6)
  310. end))
  311. end
  312.  
  313. local function getclosest(obj, distance)
  314. local last, lastx = distance + 1
  315. for i, v in pairs(workspace:GetChildren()) do
  316. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  317. local t = v.Torso
  318. local dist = (t.Position - obj.Position).magnitude
  319. if dist 2 then
  320. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  321. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  322. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  323. elseif Torsovelocity < 1 then
  324. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  325. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  326. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  327. end
  328. end
  329. attack = false
  330.  
  331.  
  332.  
  333. game:GetService'RunService'.Stepped:connect(function()
  334. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  335. velocity = RootPart.Velocity.y
  336. sine = sine + change
  337. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  338. if equipped == true or equipped == false then
  339. if RootPart.Velocity.y > 1 and hit == nil then
  340. Anim = "Jump"
  341. if attack == false then
  342. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  343. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  344. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  345. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  346. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  347. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  348. end
  349. elseif RootPart.Velocity.y < -1 and hit == nil then
  350. Anim = "Fall"
  351. if attack == false then
  352. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  353. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  354. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  355. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  356. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  357. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  358. end
  359. elseif Torsovelocity < 1 and hit ~= nil then
  360. Anim = "Idle"
  361. if attack == false then
  362. change = .3
  363. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.05 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .05)
  364. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25 - 1 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .05)
  365. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5 + 3 * math.cos(sine / 25))), 0.05)
  366. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.05)
  367. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.05 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-2), math.rad(0 + 0 * math.cos(sine / 25))), .05)
  368. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.05 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-2), math.rad(0 + 0 * math.cos(sine / 25))), .05)
  369. end
  370. elseif Torsovelocity > 2 and hit ~= nil then
  371. Anim = "Walk"
  372. if attack == false then
  373. change = 0.3
  374. RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, -0.175 + 0.025 * math.cos(sine / 3.5) + -math.sin(sine / 3.5) / 7) * angles(math.rad(5 - 2.5 * math.cos(sine / 3.5)), math.rad(0), math.rad(10 * math.cos(sine / 7))), 0.15)
  375. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * CFrame.new(0, 0, 0 + 0.025 * math.cos(sine / 3.5)) * angles(math.rad(0 - 4.5 * math.cos(sine / 3.5)), math.rad(5 - 6.5 * math.cos(sine / 3.5)), math.rad(-10 * math.cos(sine / 7))), 0.15)
  376. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(15 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(0), math.rad(10)), 0.05)
  377. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-15 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(0), math.rad(-10)), 0.05)
  378. RH.C0 = clerp(RH.C0, CFrame.new(1, -0.925 - 0.5 * math.cos(sine / 7) / 2, 0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 - 15 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  379. LH.C0 = clerp(LH.C0, CFrame.new(-1, -0.925 + 0.5 * math.cos(sine / 7) / 2, -0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 + 15 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 10 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.15)
  380. end
  381. end
  382. end
  383. if #Effects > 0 then
  384. for e = 1, #Effects do
  385. if Effects[e] ~= nil then
  386. local Thing = Effects[e]
  387. if Thing ~= nil then
  388. local Part = Thing[1]
  389. local Mode = Thing[2]
  390. local Delay = Thing[3]
  391. local IncX = Thing[4]
  392. local IncY = Thing[5]
  393. local IncZ = Thing[6]
  394. if Thing[1].Transparency
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement