Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.01 KB | None | 0 0
  1. ----------------------------------------------------------------
  2. --//Hat Kid!\\--
  3. ----------------------------------------------------------------
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,game,owner = owner,game
  7. local RealPlayer = Player
  8. do
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = owner
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76.  
  77. local h,t
  78. --Give the server mouse data 30 times every second, but only if the values changed
  79. --If player is not moving their mouse, client won't fire events
  80. while wait(1/30) do
  81. if h~=Mouse.Hit or t~=Mouse.Target then
  82. h,t=Mouse.Hit,Mouse.Target
  83. Event:FireServer({isMouse=true,Target=t,Hit=h})
  84. end
  85. end]==],Player.Character)
  86.  
  87. ----Sandboxed game object that allows the usage of client-side methods and services
  88. --Real game object
  89. local _rg = game
  90.  
  91. --Metatable for fake service
  92. local fsmt = {
  93. __index = function(self,k)
  94. local s = rawget(self,"_RealService")
  95. if s then return s[k] end
  96. end,
  97. __newindex = function(self,k,v)
  98. local s = rawget(self,"_RealService")
  99. if s then s[k]=v end
  100. end,
  101. __call = function(self,...)
  102. local s = rawget(self,"_RealService")
  103. if s then return s(...) end
  104. end
  105. }
  106. local function FakeService(t,RealService)
  107. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  108. return setmetatable(t,fsmt)
  109. end
  110.  
  111. --Fake game object
  112. local g = {
  113. GetService = function(self,s)
  114. return self[s]
  115. end,
  116. Players = FakeService({
  117. },"Players"),
  118. UserInputService = FakeService(UIS,"UserInputService"),
  119. ContextActionService = FakeService(CAS,"ContextActionService"),
  120. }
  121. rawset(g.Players,"owner",g.Players.owner)
  122. g.service = g.GetService
  123.  
  124. g.RunService = FakeService({
  125. Stepped = _rg:GetService("RunService").Heartbeat,
  126. BindToRenderStep = function(self,name,_,fun)
  127. self._btrs[name] = self.Heartbeat:Connect(fun)
  128. end,
  129. UnbindFromRenderStep = function(self,name)
  130. self._btrs[name]:Disconnect()
  131. end,
  132. },"RunService")
  133.  
  134. setmetatable(g,{
  135. __index=function(self,s)
  136. return _rg:GetService(s) or typeof(_rg[s])=="function"
  137. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  138. end,
  139. __newindex = fsmt.__newindex,
  140. __call = fsmt.__call
  141. })
  142. --Changing owner to fake player object to support owner:GetMouse()
  143. game,owner = g,g.Players.owner
  144. end
  145.  
  146. Player = owner
  147. PlayerGui = Player.PlayerGui
  148. Cam = workspace.CurrentCamera
  149. Backpack = Player.Backpack
  150. Character = Player.Character
  151. Humanoid = Character.Humanoid
  152. RootPart = Character["HumanoidRootPart"]
  153. Torso = Character["Torso"]
  154. Head = Character["Head"]
  155. RightArm = Character["Right Arm"]
  156. LeftArm = Character["Left Arm"]
  157. RightLeg = Character["Right Leg"]
  158. LeftLeg = Character["Left Leg"]
  159. RootJoint = RootPart["RootJoint"]
  160. Neck = Torso["Neck"]
  161. RightShoulder = Torso["Right Shoulder"]
  162. LeftShoulder = Torso["Left Shoulder"]
  163. RightHip = Torso["Right Hip"]
  164. LeftHip = Torso["Left Hip"]
  165.  
  166. removeuseless = game:GetService("Debris")
  167. laff = Instance.new("Sound",Head)
  168. tauntdebounce = false
  169. Character = Player.Character
  170. Humanoid = Character.Humanoid
  171. ---------
  172. plr = owner
  173. chara = plr.Character
  174. Create = Instance.new
  175. Huge = math.huge
  176.  
  177. Player = owner
  178. PlayerGui = Player.PlayerGui
  179. Cam = workspace.CurrentCamera
  180. Backpack = Player.Backpack
  181. Character = Player.Character
  182. char = Player.Character
  183. Humanoid = Character.Humanoid
  184. RootPart = Character["HumanoidRootPart"]
  185. Torso = Character["Torso"]
  186. Head = Character["Head"]
  187. RightArm = Character["Right Arm"]
  188. LeftArm = Character["Left Arm"]
  189. RightLeg = Character["Right Leg"]
  190. LeftLeg = Character["Left Leg"]
  191. RootJoint = RootPart["RootJoint"]
  192. Neck = Torso["Neck"]
  193. RightShoulder = Torso["Right Shoulder"]
  194. LeftShoulder = Torso["Left Shoulder"]
  195. RightHip = Torso["Right Hip"]
  196. LeftHip = Torso["Left Hip"]
  197.  
  198. local Orin = "http://www.roblox.com/asset/?id=1065951398"
  199. Head.face.Texture = Orin
  200. function weld(a, b, acf)
  201. local w = Instance.new("Weld", a)
  202. w.Part0 = a
  203. w.Part1 = b
  204. w.C0 = acf
  205. end
  206. --------------------------------
  207. char.Head.face.Texture = "rbxassetid://1065951398"
  208. --------------------------------
  209.  
  210. -------------------------------------------------------
  211. wait(0.2)
  212. local plr = owner
  213. local char = plr.Character
  214. local hum = char.Humanoid
  215. local hed = char.Head
  216. local root = char.HumanoidRootPart
  217. local rootj = root.RootJoint
  218. local tors = char.Torso
  219. local ra = char["Right Arm"]
  220. local la = char["Left Arm"]
  221. local rl = char["Right Leg"]
  222. local ll = char["Left Leg"]
  223. local neck = tors["Neck"]
  224. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  225. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  226. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  227. local maincolor = BrickColor.new("Plum")
  228.  
  229. -------------------------------------------------------
  230. --Start Good Stuff--
  231. -------------------------------------------------------
  232. cam = game.Workspace.CurrentCamera
  233. CF = CFrame.new
  234. angles = CFrame.Angles
  235. attack = false
  236. Euler = CFrame.fromEulerAnglesXYZ
  237. Rad = math.rad
  238. IT = Instance.new
  239. BrickC = BrickColor.new
  240. Cos = math.cos
  241. Acos = math.acos
  242. Sin = math.sin
  243. Asin = math.asin
  244. Abs = math.abs
  245. Mrandom = math.random
  246. Floor = math.floor
  247. -------------------------------------------------------
  248. --End Good Stuff--
  249. -------------------------------------------------------
  250. -------------------------------------------------------
  251. --Start HeartBeat--
  252. -------------------------------------------------------
  253. ArtificialHB = Instance.new("BindableEvent", script)
  254. ArtificialHB.Name = "Heartbeat"
  255. script:WaitForChild("Heartbeat")
  256.  
  257. frame = 1 / 60
  258. tf = 0
  259. allowframeloss = false
  260. tossremainder = false
  261.  
  262.  
  263. lastframe = tick()
  264. script.Heartbeat:Fire()
  265.  
  266.  
  267. game:GetService("RunService").Heartbeat:connect(function(s, p)
  268. tf = tf + s
  269. if tf >= frame then
  270. if allowframeloss then
  271. script.Heartbeat:Fire()
  272. lastframe = tick()
  273. else
  274. for i = 1, math.floor(tf / frame) do
  275. script.Heartbeat:Fire()
  276. end
  277. lastframe = tick()
  278. end
  279. if tossremainder then
  280. tf = 0
  281. else
  282. tf = tf - frame * math.floor(tf / frame)
  283. end
  284. end
  285. end)
  286. -------------------------------------------------------
  287. --End HeartBeat--
  288. -------------------------------------------------------
  289.  
  290. -------------------------------------------------------
  291. --Start Important Functions--
  292. -------------------------------------------------------
  293. function swait(num)
  294. if num == 0 or num == nil then
  295. game:service("RunService").Stepped:wait(0)
  296. else
  297. for i = 0, num do
  298. game:service("RunService").Stepped:wait(0)
  299. end
  300. end
  301. end
  302. function thread(f)
  303. coroutine.resume(coroutine.create(f))
  304. end
  305. function clerp(a, b, t)
  306. local qa = {
  307. QuaternionFromCFrame(a)
  308. }
  309. local qb = {
  310. QuaternionFromCFrame(b)
  311. }
  312. local ax, ay, az = a.x, a.y, a.z
  313. local bx, by, bz = b.x, b.y, b.z
  314. local _t = 1 - t
  315. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  316. end
  317. function QuaternionFromCFrame(cf)
  318. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  319. local trace = m00 + m11 + m22
  320. if trace > 0 then
  321. local s = math.sqrt(1 + trace)
  322. local recip = 0.5 / s
  323. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  324. else
  325. local i = 0
  326. if m00 < m11 then
  327. i = 1
  328. end
  329. if m22 > (i == 0 and m00 or m11) then
  330. i = 2
  331. end
  332. if i == 0 then
  333. local s = math.sqrt(m00 - m11 - m22 + 1)
  334. local recip = 0.5 / s
  335. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  336. elseif i == 1 then
  337. local s = math.sqrt(m11 - m22 - m00 + 1)
  338. local recip = 0.5 / s
  339. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  340. elseif i == 2 then
  341. local s = math.sqrt(m22 - m00 - m11 + 1)
  342. local recip = 0.5 / s
  343. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  344. end
  345. end
  346. end
  347. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  348. local xs, ys, zs = x + x, y + y, z + z
  349. local wx, wy, wz = w * xs, w * ys, w * zs
  350. local xx = x * xs
  351. local xy = x * ys
  352. local xz = x * zs
  353. local yy = y * ys
  354. local yz = y * zs
  355. local zz = z * zs
  356. 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))
  357. end
  358. function QuaternionSlerp(a, b, t)
  359. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  360. local startInterp, finishInterp
  361. if cosTheta >= 1.0E-4 then
  362. if 1 - cosTheta > 1.0E-4 then
  363. local theta = math.acos(cosTheta)
  364. local invSinTheta = 1 / Sin(theta)
  365. startInterp = Sin((1 - t) * theta) * invSinTheta
  366. finishInterp = Sin(t * theta) * invSinTheta
  367. else
  368. startInterp = 1 - t
  369. finishInterp = t
  370. end
  371. elseif 1 + cosTheta > 1.0E-4 then
  372. local theta = math.acos(-cosTheta)
  373. local invSinTheta = 1 / Sin(theta)
  374. startInterp = Sin((t - 1) * theta) * invSinTheta
  375. finishInterp = Sin(t * theta) * invSinTheta
  376. else
  377. startInterp = t - 1
  378. finishInterp = t
  379. end
  380. 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
  381. end
  382. function rayCast(Position, Direction, Range, Ignore)
  383. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  384. end
  385. local RbxUtility = LoadLibrary("RbxUtility")
  386. local Create = RbxUtility.Create
  387.  
  388. -------------------------------------------------------
  389. --Start Damage Function--
  390. -------------------------------------------------------
  391. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  392. if hit.Parent == nil then
  393. return
  394. end
  395. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  396. for _, v in pairs(hit.Parent:children()) do
  397. if v:IsA("Humanoid") then
  398. h = v
  399. end
  400. end
  401. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  402.  
  403. hit.Parent:FindFirstChild("Head"):BreakJoints()
  404. end
  405.  
  406. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  407. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  408. if hit.Parent.DebounceHit.Value == true then
  409. return
  410. end
  411. end
  412. if insta == true then
  413. hit.Parent:FindFirstChild("Head"):BreakJoints()
  414. end
  415. local c = Create("ObjectValue"){
  416. Name = "creator",
  417. Value = owner
  418. Parent = h,
  419. }
  420. game:GetService("Debris"):AddItem(c, .5)
  421. if HitSound ~= nil and HitPitch ~= nil then
  422. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  423. end
  424. local Damage = math.random(minim, maxim)
  425. local blocked = false
  426. local block = hit.Parent:findFirstChild("Block")
  427. if block ~= nil then
  428. if block.className == "IntValue" then
  429. if block.Value > 0 then
  430. blocked = true
  431. block.Value = block.Value - 1
  432. print(block.Value)
  433. end
  434. end
  435. end
  436. if blocked == false then
  437. h.Health = h.Health - Damage
  438. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  439. else
  440. h.Health = h.Health - (Damage / 2)
  441. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  442. end
  443. if Type == "Knockdown" then
  444. local hum = hit.Parent.Humanoid
  445. hum.PlatformStand = true
  446. coroutine.resume(coroutine.create(function(HHumanoid)
  447. swait(1)
  448. HHumanoid.PlatformStand = false
  449. end), hum)
  450. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  451. local bodvol = Create("BodyVelocity"){
  452. velocity = angle * knockback,
  453. P = 5000,
  454. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  455. Parent = hit,
  456. }
  457. local rl = Create("BodyAngularVelocity"){
  458. P = 3000,
  459. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  460. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  461. Parent = hit,
  462. }
  463. game:GetService("Debris"):AddItem(bodvol, .5)
  464. game:GetService("Debris"):AddItem(rl, .5)
  465. elseif Type == "Normal" then
  466. local vp = Create("BodyVelocity"){
  467. P = 500,
  468. maxForce = Vector3.new(math.huge, 0, math.huge),
  469. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  470. }
  471. if knockback > 0 then
  472. vp.Parent = hit.Parent.Torso
  473. end
  474. game:GetService("Debris"):AddItem(vp, .5)
  475. elseif Type == "Up" then
  476. local bodyVelocity = Create("BodyVelocity"){
  477. velocity = Vector3.new(0, 20, 0),
  478. P = 5000,
  479. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  480. Parent = hit,
  481. }
  482. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  483. elseif Type == "DarkUp" then
  484. coroutine.resume(coroutine.create(function()
  485. for i = 0, 1, 0.1 do
  486. swait()
  487. Effects.Block.Create(BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  488. end
  489. end))
  490. local bodyVelocity = Create("BodyVelocity"){
  491. velocity = Vector3.new(0, 20, 0),
  492. P = 5000,
  493. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  494. Parent = hit,
  495. }
  496. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  497. elseif Type == "Snare" then
  498. local bp = Create("BodyPosition"){
  499. P = 2000,
  500. D = 100,
  501. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  502. position = hit.Parent.Torso.Position,
  503. Parent = hit.Parent.Torso,
  504. }
  505. game:GetService("Debris"):AddItem(bp, 1)
  506. elseif Type == "Freeze" then
  507. local BodPos = Create("BodyPosition"){
  508. P = 50000,
  509. D = 1000,
  510. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  511. position = hit.Parent.Torso.Position,
  512. Parent = hit.Parent.Torso,
  513. }
  514. local BodGy = Create("BodyGyro") {
  515. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  516. P = 20e+003,
  517. Parent = hit.Parent.Torso,
  518. cframe = hit.Parent.Torso.CFrame,
  519. }
  520. hit.Parent.Torso.Anchored = true
  521. coroutine.resume(coroutine.create(function(Part)
  522. swait(1.5)
  523. Part.Anchored = false
  524. end), hit.Parent.Torso)
  525. game:GetService("Debris"):AddItem(BodPos, 3)
  526. game:GetService("Debris"):AddItem(BodGy, 3)
  527. end
  528. local debounce = Create("BoolValue"){
  529. Name = "DebounceHit",
  530. Parent = hit.Parent,
  531. Value = true,
  532. }
  533. game:GetService("Debris"):AddItem(debounce, Delay)
  534. c = Create("ObjectValue"){
  535. Name = "creator",
  536. Value = Player,
  537. Parent = h,
  538. }
  539. game:GetService("Debris"):AddItem(c, .5)
  540. end
  541. end
  542. -------------------------------------------------------
  543. --End Damage Function--
  544. -------------------------------------------------------
  545.  
  546. -------------------------------------------------------
  547. --Start Damage Function Customization--
  548. -------------------------------------------------------
  549. function ShowDamage(Pos, Text, Time, Color)
  550. local Rate = (1 / 30)
  551. local Pos = (Pos or Vector3.new(0, 0, 0))
  552. local Text = (Text or "")
  553. local Time = (Time or 2)
  554. local Color = (Color or Color3.new(255, 255, 1))
  555. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  556. EffectPart.Anchored = true
  557. local BillboardGui = Create("BillboardGui"){
  558. Size = UDim2.new(3, 0, 3, 0),
  559. Adornee = EffectPart,
  560. Parent = EffectPart,
  561. }
  562. local TextLabel = Create("TextLabel"){
  563. BackgroundTransparency = 1,
  564. Size = UDim2.new(1, 0, 1, 0),
  565. Text = Text,
  566. Font = "Bodoni",
  567. TextColor3 = Color,
  568. TextScaled = true,
  569. TextStrokeColor3 = Color3.fromRGB(0,0,0),
  570. Parent = BillboardGui,
  571. }
  572. game.Debris:AddItem(EffectPart, (Time))
  573. EffectPart.Parent = game:GetService("Workspace")
  574. delay(0, function()
  575. local Frames = (Time / Rate)
  576. for Frame = 1, Frames do
  577. wait(Rate)
  578. local Percent = (Frame / Frames)
  579. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  580. TextLabel.TextTransparency = Percent
  581. end
  582. if EffectPart and EffectPart.Parent then
  583. EffectPart:Destroy()
  584. end
  585. end)
  586. end
  587. -------------------------------------------------------
  588. --End Damage Function Customization--
  589. -------------------------------------------------------
  590.  
  591. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  592. for _, c in pairs(workspace:children()) do
  593. local hum = c:findFirstChild("Humanoid")
  594. if hum ~= nil then
  595. local head = c:findFirstChild("Head")
  596. if head ~= nil then
  597. local targ = head.Position - Part.Position
  598. local mag = targ.magnitude
  599. if magni >= mag and c.Name ~= plr.Name then
  600. Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2)
  601. end
  602. end
  603. end
  604. end
  605. end
  606.  
  607.  
  608. CFuncs = {
  609. Part = {
  610. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  611. local Part = Create("Part")({
  612. Parent = Parent,
  613. Reflectance = Reflectance,
  614. Transparency = Transparency,
  615. CanCollide = false,
  616. Locked = true,
  617. BrickColor = BrickColor.new(tostring(BColor)),
  618. Name = Name,
  619. Size = Size,
  620. Material = Material
  621. })
  622. RemoveOutlines(Part)
  623. return Part
  624. end
  625. },
  626. Mesh = {
  627. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  628. local Msh = Create(Mesh)({
  629. Parent = Part,
  630. Offset = OffSet,
  631. Scale = Scale
  632. })
  633. if Mesh == "SpecialMesh" then
  634. Msh.MeshType = MeshType
  635. Msh.MeshId = MeshId
  636. end
  637. return Msh
  638. end
  639. },
  640. Mesh = {
  641. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  642. local Msh = Create(Mesh)({
  643. Parent = Part,
  644. Offset = OffSet,
  645. Scale = Scale
  646. })
  647. if Mesh == "SpecialMesh" then
  648. Msh.MeshType = MeshType
  649. Msh.MeshId = MeshId
  650. end
  651. return Msh
  652. end
  653. },
  654. Weld = {
  655. Create = function(Parent, Part0, Part1, C0, C1)
  656. local Weld = Create("Weld")({
  657. Parent = Parent,
  658. Part0 = Part0,
  659. Part1 = Part1,
  660. C0 = C0,
  661. C1 = C1
  662. })
  663. return Weld
  664. end
  665. },
  666. Sound = {
  667. Create = function(id, par, vol, pit)
  668. coroutine.resume(coroutine.create(function()
  669. local S = Create("Sound")({
  670. Volume = vol,
  671. Pitch = pit or 1,
  672. SoundId = id,
  673. Parent = par or workspace
  674. })
  675. wait()
  676. S:play()
  677. game:GetService("Debris"):AddItem(S, 6)
  678. end))
  679. end
  680. },
  681. ParticleEmitter = {
  682. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  683. local fp = Create("ParticleEmitter")({
  684. Parent = Parent,
  685. Color = ColorSequence.new(Color1, Color2),
  686. LightEmission = LightEmission,
  687. Size = Size,
  688. Texture = Texture,
  689. Transparency = Transparency,
  690. ZOffset = ZOffset,
  691. Acceleration = Accel,
  692. Drag = Drag,
  693. LockedToPart = LockedToPart,
  694. VelocityInheritance = VelocityInheritance,
  695. EmissionDirection = EmissionDirection,
  696. Enabled = Enabled,
  697. Lifetime = LifeTime,
  698. Rate = Rate,
  699. Rotation = Rotation,
  700. RotSpeed = RotSpeed,
  701. Speed = Speed,
  702. VelocitySpread = VelocitySpread
  703. })
  704. return fp
  705. end
  706. }
  707. }
  708. function RemoveOutlines(part)
  709. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  710. end
  711. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  712. local Part = Create("Part")({
  713. formFactor = FormFactor,
  714. Parent = Parent,
  715. Reflectance = Reflectance,
  716. Transparency = Transparency,
  717. CanCollide = false,
  718. Locked = true,
  719. BrickColor = BrickColor.new(tostring(BColor)),
  720. Name = Name,
  721. Size = Size,
  722. Material = Material
  723. })
  724. RemoveOutlines(Part)
  725. return Part
  726. end
  727. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  728. local Msh = Create(Mesh)({
  729. Parent = Part,
  730. Offset = OffSet,
  731. Scale = Scale
  732. })
  733. if Mesh == "SpecialMesh" then
  734. Msh.MeshType = MeshType
  735. Msh.MeshId = MeshId
  736. end
  737. return Msh
  738. end
  739. function CreateWeld(Parent, Part0, Part1, C0, C1)
  740. local Weld = Create("Weld")({
  741. Parent = Parent,
  742. Part0 = Part0,
  743. Part1 = Part1,
  744. C0 = C0,
  745. C1 = C1
  746. })
  747. return Weld
  748. end
  749.  
  750.  
  751.  
  752. -------------------------------------------------------
  753. --End Effect Function--
  754. -------------------------------------------------------
  755. function Cso(ID, PARENT, VOLUME, PITCH)
  756. local NSound = nil
  757. coroutine.resume(coroutine.create(function()
  758. NSound = IT("Sound", PARENT)
  759. NSound.Volume = VOLUME
  760. NSound.Pitch = PITCH
  761. NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
  762. swait()
  763. NSound:play()
  764. game:GetService("Debris"):AddItem(NSound, 50)
  765. end))
  766. return NSound
  767. end
  768. function CameraEnshaking(Length, Intensity)
  769. coroutine.resume(coroutine.create(function()
  770. local intensity = 1 * Intensity
  771. local rotM = 0.01 * Intensity
  772. for i = 0, Length, 0.1 do
  773. swait()
  774. intensity = intensity - 0.05 * Intensity / Length
  775. rotM = rotM - 5.0E-4 * Intensity / Length
  776. hum.CameraOffset = Vector3.new(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)))
  777. cam.CFrame = cam.CFrame * CF(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) * Euler(Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM)
  778. end
  779. hum.CameraOffset = Vector3.new(0, 0, 0)
  780. end))
  781. end
  782. -------------------------------------------------------
  783. --End Important Functions--
  784. -------------------------------------------------------
  785.  
  786. ----------------------------------------------------------------------------------
  787. hum.WalkSpeed = 16
  788. hum.JumpPower = 57
  789. ----------------------------------------------------------------------------------
  790. local AddInstance = function(Object, ...)
  791. local Obj = Instance.new(Object)
  792. for i,v in next,(...) do
  793. Obj[i] = v
  794. end
  795. return Obj
  796. end
  797. ----------------------------------------------------
  798.  
  799. local Reaper = AddInstance("Part",{
  800. Parent = hed,
  801. CFrame = hed.CFrame,
  802. formFactor = "Symmetric",
  803. Size = Vector3.new(1, 1, 1),
  804. CanCollide = false,
  805. TopSurface = "Smooth",
  806. BottomSurface = "Smooth",
  807. Locked = true,
  808. })
  809. local Weld = AddInstance("Weld",{
  810. Parent = Reaper,
  811. Part0 = hed,
  812. C0 = CFrame.new(0, 1.45, 0)*CFrame.Angles(0, 0, 0),
  813. Part1 = Reaper,
  814. })
  815. local Mesh = AddInstance("SpecialMesh",{
  816. Parent = Reaper,
  817. MeshId = "rbxassetid://2711178",
  818. TextureId = "rbxassetid://2938935864",
  819. Scale = Vector3.new(0.85,0.85,0.85),
  820. VertexColor = Vector3.new(1, 1, 1),
  821. })
  822.  
  823. -------------------------------------------------------
  824. local Hair = AddInstance("Part",{
  825. Parent = hed,
  826. CFrame = hed.CFrame,
  827. formFactor = "Symmetric",
  828. Size = Vector3.new(1, 1, 1),
  829. CanCollide = false,
  830. TopSurface = "Smooth",
  831. BottomSurface = "Smooth",
  832. Locked = true,
  833. })
  834. local Weld = AddInstance("Weld",{
  835. Parent = Hair,
  836. Part0 = hed,
  837. C0 = CFrame.new(-0.05, 0.35, 0.4)*CFrame.Angles(0, 0, 0),
  838. Part1 = Hair,
  839. })
  840. local Mesh = AddInstance("SpecialMesh",{
  841. Parent = Hair,
  842. MeshId = "rbxassetid://1138830322",
  843. TextureId = "rbxassetid://869796655",
  844. Scale = Vector3.new(0.6,0.6,0.6),
  845. VertexColor = Vector3.new(1, 1, 1),
  846. })
  847. -------------------------------------------------------
  848. local Cape = AddInstance("Part",{
  849. Parent = Torso,
  850. CFrame = Torso.CFrame,
  851. formFactor = "Symmetric",
  852. Size = Vector3.new(1, 1, 1),
  853. CanCollide = false,
  854. TopSurface = "Smooth",
  855. BottomSurface = "Smooth",
  856. Locked = true,
  857. })
  858. local Weld = AddInstance("Weld",{
  859. Parent = Cape,
  860. Part0 = Torso,
  861. C0 = CFrame.new(0, -0.2, 0.35)*CFrame.Angles(0, 0, 0),
  862. Part1 = Cape,
  863. })
  864. local Mesh = AddInstance("SpecialMesh",{
  865. Parent = Cape,
  866. MeshId = "rbxassetid://114046169",
  867. TextureId = "rbxassetid://501524456",
  868. Scale = Vector3.new(1.3,1.3,1.3),
  869. VertexColor = Vector3.new(1, 1, 1),
  870. })
  871. ---------------------------------------------------------------
  872. wait(1)
  873. plr = owner
  874. char = plr.Character
  875. whitecolor = Color3.new(255,255,1)
  876. epicmode = false
  877. normal = true
  878. for i,v in pairs(char:GetChildren()) do
  879. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  880. v:Destroy()
  881. end
  882. end
  883. local shirt = Instance.new("Shirt",char)
  884. shirt.ShirtTemplate = "rbxassetid://1408840214"
  885. local pants = Instance.new("Pants",char)
  886. pants.PantsTemplate = "rbxassetid://1409282652"
  887. local bdycolors = char["Body Colors"]
  888. bdycolors.HeadColor3 = whitecolor
  889. bdycolors.LeftArmColor3 = whitecolor
  890. bdycolors.LeftLegColor3 = whitecolor
  891. bdycolors.RightArmColor3 = whitecolor
  892. bdycolors.RightLegColor3 = whitecolor
  893. bdycolors.TorsoColor3 = whitecolor
  894. for i,v in pairs(char:GetChildren()) do
  895. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  896. v:Destroy()
  897. end
  898. end
  899.  
  900.  
  901.  
  902. local BC = Character["Body Colors"]
  903. BC.HeadColor = BrickColor.new("Pastel brown")
  904. BC.LeftArmColor = BrickColor.new("Pastel brown")
  905. BC.LeftLegColor = BrickColor.new("Pastel brown")
  906. BC.RightArmColor = BrickColor.new("Pastel brown")
  907. BC.RightLegColor = BrickColor.new("Pastel brown")
  908. BC.TorsoColor = BrickColor.new("Pastel brown")
  909.  
  910. -----------------------------------------------
  911.  
  912. theme = Instance.new("Sound", Head)
  913. theme.Volume = 0.7
  914. theme.Name = "theme"
  915. theme.Looped = true
  916.  
  917. mouse.KeyDown:connect(function(Press)
  918. Press=Press:lower()
  919. if Press=='z' then
  920. id = 0
  921. theme.SoundId = "rbxassetid://"..id
  922. theme:Play()
  923. end
  924. end)
  925.  
  926. mouse.KeyDown:connect(function(Press)
  927. Press=Press:lower()
  928. if Press=='c' then
  929. id = 1191722766
  930. theme.SoundId = "rbxassetid://"..id
  931. theme:Play()
  932. end
  933. end)
  934.  
  935. mouse.KeyDown:connect(function(Press)
  936. Press=Press:lower()
  937. if Press=='v' then
  938. id = 2377141094
  939. theme.SoundId = "rbxassetid://"..id
  940. theme:Play()
  941. end
  942. end)
  943.  
  944. mouse.KeyDown:connect(function(Press)
  945. Press=Press:lower()
  946. if Press=='b' then
  947. id = 1129466633
  948. theme.SoundId = "rbxassetid://"..id
  949. theme:Play()
  950. end
  951. end)
  952.  
  953. mouse.KeyDown:connect(function(Press)
  954. Press=Press:lower()
  955. if Press=='n' then
  956. id = 1117396305
  957. theme.SoundId = "rbxassetid://"..id
  958. theme:Play()
  959. end
  960. end)
  961.  
  962. mouse.KeyDown:connect(function(Press)
  963. Press=Press:lower()
  964. if Press=='m' then
  965. id = 991980152
  966. theme.SoundId = "rbxassetid://"..id
  967. theme:Play()
  968. end
  969. end)
  970.  
  971. mouse.KeyDown:connect(function(Press)
  972. Press=Press:lower()
  973. if Press=='x' then
  974. id = 2279080577
  975. theme.SoundId = "rbxassetid://"..id
  976. theme:Play()
  977. end
  978. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement