Znimator

My character

Jan 8th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.49 KB | None | 0 0
  1. -- This script has been converted to FE by ki2005rill
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7.     print("FE Compatibility do ki2005rill")
  8.     script.Parent = Player.Character
  9.  
  10.     --RemoteEvent for communicating
  11.     local Event = Instance.new("RemoteEvent")
  12.     Event.Name = "UserInput_Event"
  13.  
  14.     --Fake event to make stuff like Mouse.KeyDown work
  15.     local function fakeEvent()
  16.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17.         t.connect = t.Connect
  18.         return t
  19.     end
  20.  
  21.     --Creating fake input objects with fake variables
  22.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26.     end}
  27.     --Merged 2 functions into one by checking amount of arguments
  28.     CAS.UnbindAction = CAS.BindAction
  29.  
  30.     --This function will trigger the events that have been :Connect()'ed
  31.     local function te(self,ev,...)
  32.         local t = m[ev]
  33.         if t and t._fakeEvent and t.Function then
  34.             t.Function(...)
  35.         end
  36.     end
  37.     m.TrigEvent = te
  38.     UIS.TrigEvent = te
  39.  
  40.     Event.OnServerEvent:Connect(function(plr,io)
  41.         if plr~=Player then return end
  42.         if io.isMouse then
  43.             m.Target = io.Target
  44.             m.Hit = io.Hit
  45.         else
  46.             local b = io.UserInputState == Enum.UserInputState.Begin
  47.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49.             end
  50.             for _,t in pairs(CAS.Actions) do
  51.                 for _,k in pairs(t.Keys) do
  52.                     if k==io.KeyCode then
  53.                         t.Function(t.Name,io.UserInputState,io)
  54.                     end
  55.                 end
  56.             end
  57.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59.         end
  60.     end)
  61.     Event.Parent = NLS([==[
  62.     local Player = game:GetService("Players").LocalPlayer
  63.     local Event = script:WaitForChild("UserInput_Event")
  64.  
  65.     local UIS = game:GetService("UserInputService")
  66.     local input = function(io,a)
  67.         if a then return end
  68.         --Since InputObject is a client-side instance, we create and pass table instead
  69.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70.     end
  71.     UIS.InputBegan:Connect(input)
  72.     UIS.InputEnded:Connect(input)
  73.  
  74.     local Mouse = Player:GetMouse()
  75.     local h,t
  76.     --Give the server mouse data 30 times every second, but only if the values changed
  77.     --If player is not moving their mouse, client won't fire events
  78.     while wait(1/30) do
  79.         if h~=Mouse.Hit or t~=Mouse.Target then
  80.             h,t=Mouse.Hit,Mouse.Target
  81.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  82.         end
  83.     end]==],Player.Character)
  84.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. --Template made by PixelFir3--
  87. --[A Hot Potato]--
  88. --script by rru--
  89. --leaked by dOOVEN/REE RAWR EKS D LOL DAB LIT XDXD--
  90. --also asriel, pls dont talk shit bout me behind my back again kthx--
  91. script.Name = "WeaponScript"
  92. wait(1 / 60)
  93. Effects = { }
  94. local verlet = {}
  95. verlet.step_time = 1 / 50
  96. verlet.gravity = Vector3.new(0, -150, 0) --//
  97. local Player = owner
  98. script.Parent = Player.PlayerGui
  99. local Character = Player.Character
  100. local Humanoid = Character.Humanoid
  101. local LeftArm = Character["Left Arm"]
  102. local RightArm = Character["Right Arm"]
  103. local LeftLeg = Character["Left Leg"]
  104. local RightLeg = Character["Right Leg"]
  105. local Head = Character.Head
  106. local Torso = Character.Torso
  107. local bc = BrickColor.new
  108. Head.BrickColor = BrickColor.new("Pearl")
  109. Torso.BrickColor = BrickColor.new("Pearl")
  110. LeftArm.BrickColor = BrickColor.new("Pearl")
  111. RightArm.BrickColor = BrickColor.new("Pearl")
  112. LeftLeg.BrickColor = BrickColor.new("Pearl")
  113. RightLeg.BrickColor = BrickColor.new("Pearl")
  114. pcall(function()
  115. Character.Shirt:Destroy()
  116. end)
  117. pcall(function()
  118. Character.Pants:Destroy()
  119. end)
  120. shirt = Instance.new("Shirt", Character)
  121. shirt.Name = "Shirt"
  122. pants = Instance.new("Pants", Character)
  123. pants.Name = "Pants"
  124. Character.Head.face.Texture= "rbxassetid://15366173"
  125. local Camera = game.Workspace.CurrentCamera
  126. local RootPart = Character.HumanoidRootPart
  127. local RootJoint = RootPart.RootJoint
  128. local attack = false
  129. local Anim = "Idle"
  130. local attacktype = 1
  131. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  132. local velocity = RootPart.Velocity.y
  133. local sine = 0
  134. local change = 1
  135. local vt = Vector3.new
  136. local cf = CFrame.new
  137. local ang = CFrame.Angles
  138. local ud2 = UDim2.new
  139. local it = Instance.new
  140.  
  141. local equipped = false
  142.  
  143. music = Instance.new("Sound", Character)
  144. music.SoundId = "http://www.roblox.com/asset/?id=0"
  145. music.Volume = 0
  146. music.Looped = true
  147. wait(0.1)
  148. music:Play()
  149.  
  150. music2 = Instance.new("Sound", Character)
  151. music2.SoundId = "http://www.roblox.com/asset/?id=190845741"
  152. music2.Volume = 0.5
  153. music2.Looped = true
  154. local Create = LoadLibrary("RbxUtility").Create
  155. local runService = game:service("RunService")
  156.  
  157. local m = Create("Model"){
  158.     Parent = Character,
  159.     Name = "WeaponModel",
  160. }
  161.  
  162. if Humanoid:FindFirstChild("Animator") then
  163.   Humanoid.Animator:Destroy()
  164. end
  165.  
  166. if Character:FindFirstChild("Animate") then
  167.   Character.Animate:Destroy()
  168. end
  169.  
  170. local newMotor = function(part0, part1, c0, c1)
  171.     local w = Create("Motor"){
  172.         Parent = part0,
  173.         Part0 = part0,
  174.         Part1 = part1,
  175.         C0 = c0,
  176.         C1 = c1,
  177.     }
  178.     return w
  179. end
  180.  
  181. function clerp(a, b, t)
  182.     return a:lerp(b, t)
  183. end
  184.  
  185. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  186. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  187.  
  188. function weldJoint(p0, p1, c0, c1)
  189.   local w = it("Motor")
  190.   w.Parent = p0
  191.   w.Part0 = p0
  192.   w.Part1 = p1
  193.   w.C0 = c0
  194.   w.C1 = c1
  195.   w.MaxVelocity = 1
  196.   return w
  197. end
  198.  
  199. function lerp(t)
  200.   return t[1]:Lerp(t[2], t[3])
  201. end
  202.  
  203. local neck = Torso.Neck
  204. local rootjoint = RootJoint
  205.  
  206. neck.C0 = cf(0, 1, 0)
  207. neck.C1 = cf(0, -0.5, 0)
  208. rootjoint.C0 = cf(0, 0, 0)
  209. rootjoint.C1 = cf(0, 0, 0)
  210. RW = weldJoint(Torso, RightArm, cf(1, 0.5, 0), cf(-0.5, 0.5, 0))
  211. LW = weldJoint(Torso, LeftArm, cf(-1, 0.5, 0), cf(0.5, 0.5, 0))
  212. RH = weldJoint(Torso, RightLeg, cf(1, -1, 0), cf(0.5, 1, 0))
  213. LH = weldJoint(Torso, LeftLeg, cf(-1, -1, 0), cf(-0.5, 1, 0))
  214.  
  215. ---[[ Rotating weapon handle ]]---
  216.  
  217. local slhandle = Instance.new("Part", Character)
  218. slhandle.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  219. slhandle.Transparency = 0.7
  220. slhandle.TopSurface = Enum.SurfaceType.SteppingMotor
  221. slhandle.Size = Vector3.new(0.5, 0.5, 0.5)
  222. slhandle.Name = "SLHandle"
  223. slhandle.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  224. slhandle.CFrame = CFrame.new(13.9, 1.84, -1.32) * CFrame.Angles(-3.1415927410126, 3.7252902984619e-07, 3.1415927410126)
  225. slhandle.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  226. slhandle.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  227. slhandle.Friction = 0.3
  228. slhandle.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  229. slhandle.Transparency = 1
  230.  
  231. local decal = Instance.new("Decal", slhandle)
  232. decal.Texture = "http://www.roblox.com/asset/?id=0"
  233.  
  234. local SLHandleWeld = Instance.new("Motor",LeftArm)
  235. SLHandleWeld.Part0 = LeftArm
  236. SLHandleWeld.Part1 = slhandle
  237. SLHandleWeld.C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,0,0) -- Offset the rotation handle below the left arm
  238. SLHandleWeld.C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  239.  
  240. -------------------------------------------------------------------
  241.  
  242. function setLerp(t, i, offsets)
  243.   i = i * 0.75
  244.   if (offsets ~= nil and offsets == true) and attack == false then
  245.   rootjoint.C0 = lerp({rootjoint.C0, t[1], i})
  246.   neck.C0 = lerp({neck.C0, t[2], i})
  247.   RW.C0 = lerp({RW.C0, t[3], i})
  248.   LW.C0 = lerp({LW.C0, t[4], i})
  249.   RH.C0 = lerp({RH.C0, t[5], i})
  250.   LH.C0 = lerp({LH.C0, t[6], i})
  251.   else
  252.   rootjoint.C0 = lerp({rootjoint.C0, t[1], i})
  253.   neck.C0 = lerp({neck.C0, t[2] * neck.C1, i})
  254.   RW.C0 = lerp({RW.C0, t[3] * RW.C1, i})
  255.   LW.C0 = lerp({LW.C0, t[4] * LW.C1, i})
  256.   RH.C0 = lerp({RH.C0, t[5] * RH.C1, i})
  257.   LH.C0 = lerp({LH.C0, t[6] * LH.C1, i})
  258.   end
  259.   if t[7] then
  260. if equipped == false then
  261.     SLHandleWeld.C0 = lerp({SLHandleWeld.C0, t[7], i})
  262. else
  263.     HandleeWeld.C0 = lerp({HandleeWeld.C0, t[7], i})
  264. end
  265.   end
  266. end
  267.  
  268. function swait(num)
  269.   if num == 0 or num == nil then
  270.     runService.Stepped:wait()
  271.   else
  272.     for i = 0, num do
  273.       runService.Stepped:wait()
  274.     end
  275.   end
  276. end
  277.  
  278. function RemoveOutlines(part)
  279.     part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  280. end
  281.    
  282. CFuncs = {
  283.     Part = {
  284.         Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  285.             local Part = Create("Part"){
  286.                 Parent = Parent,
  287.                 Reflectance = Reflectance,
  288.                 Transparency = Transparency,
  289.                 CanCollide = false,
  290.                 Locked = true,
  291.                 BrickColor = BrickColor.new(tostring(BColor)),
  292.                 Name = Name,
  293.                 Size = Size,
  294.                 Material = Material,
  295.             }
  296.             RemoveOutlines(Part)
  297.             return Part
  298.         end;
  299.     };
  300.    
  301.     Mesh = {
  302.         Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  303.             local Msh = Create(Mesh){
  304.                 Parent = Part,
  305.                 Offset = OffSet,
  306.                 Scale = Scale,
  307.             }
  308.             if Mesh == "SpecialMesh" then
  309.                 Msh.MeshType = MeshType
  310.                 Msh.MeshId = MeshId
  311.             end
  312.             return Msh
  313.         end;
  314.     };
  315.  
  316.     Weld = {
  317.         Create = function(Parent, Part0, Part1, C0, C1)
  318.             local Weld = Create("Weld"){
  319.                 Parent = Parent,
  320.                 Part0 = Part0,
  321.                 Part1 = Part1,
  322.                 C0 = C0,
  323.                 C1 = C1,
  324.             }
  325.             return Weld
  326.         end;
  327.     };
  328.  
  329.     Sound = {
  330.         Create = function(id, par, vol, pit)
  331.             coroutine.resume(coroutine.create(function()
  332.                 local Sound = Create("Sound"){
  333.                     Volume = vol,
  334.                     Pitch = pit or 1,
  335.                     SoundId = "rbxassetid://" .. id,
  336.                     Parent = par or workspace,
  337.                 }
  338.                 Sound:play()
  339.                 game:GetService("Debris"):AddItem(Sound, 10)
  340.             end))
  341.         end;
  342.     };
  343.    
  344.     Decal = {
  345.         Create = function(Color, Texture, Transparency, Name, Parent)
  346.             local Decal = Create("Decal"){
  347.                 Color3 = Color,
  348.                 Texture = "rbxassetid://" .. Texture,
  349.                 Transparency = Transparency,
  350.                 Name = Name,
  351.                 Parent = Parent,
  352.             }
  353.             return Decal
  354.         end;
  355.     };
  356.    
  357.     BillboardGui = {
  358.         Create = function(Parent, Image, Position, Size)
  359.             local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1))
  360.             BillPar.CFrame = CFrame.new(Position)
  361.             local Bill = Create("BillboardGui"){
  362.                 Parent = BillPar,
  363.                 Adornee = BillPar,
  364.                 Size = UDim2.new(1, 0, 1, 0),
  365.                 SizeOffset = Vector2.new(Size, Size),
  366.             }
  367.             local d = Create("ImageLabel", Bill){
  368.                 Parent = Bill,
  369.                 BackgroundTransparency = 1,
  370.                 Size = UDim2.new(1, 0, 1, 0),
  371.                 Image = "rbxassetid://" .. Image,
  372.             }
  373.             return BillPar
  374.         end
  375.     };
  376.    
  377.     ParticleEmitter = {
  378.         Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  379.             local Particle = Create("ParticleEmitter"){
  380.                 Parent = Parent,
  381.                 Color = ColorSequence.new(Color1, Color2),
  382.                 LightEmission = LightEmission,
  383.                 Size = Size,
  384.                 Texture = Texture,
  385.                 Transparency = Transparency,
  386.                 ZOffset = ZOffset,
  387.                 Acceleration = Accel,
  388.                 Drag = Drag,
  389.                 LockedToPart = LockedToPart,
  390.                 VelocityInheritance = VelocityInheritance,
  391.                 EmissionDirection = EmissionDirection,
  392.                 Enabled = Enabled,
  393.                 Lifetime = LifeTime,
  394.                 Rate = Rate,
  395.                 Rotation = Rotation,
  396.                 RotSpeed = RotSpeed,
  397.                 Speed = Speed,
  398.                 VelocitySpread = VelocitySpread,
  399.             }
  400.             return Particle
  401.         end;
  402.     };
  403.    
  404.     CreateTemplate = {
  405.        
  406.     };
  407. }
  408.  
  409. --------------[[ WEAPON MODEL ]]--------------------
  410.  
  411. ----------------------------------------------------
  412.  
  413.  
  414. function rayCast(Position, Direction, Range, Ignore)
  415.     return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  416. end
  417.  
  418. FindNearestTorso = function(pos)
  419.     local list = (game.Workspace:children())
  420.     local torso = nil
  421.     local dist = 1000
  422.     local temp, human, temp2 = nil, nil, nil
  423.     for x = 1, #list do
  424.         temp2 = list[x]
  425.         if temp2.className == "Model" and temp2.Name ~= Character.Name then
  426.             temp = temp2:findFirstChild("Torso")
  427.             human = temp2:findFirstChild("Humanoid")
  428.             if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  429.                 local dohit = true
  430.                 if dohit == true then
  431.                     torso = temp
  432.                     dist = (temp.Position - pos).magnitude
  433.                 end
  434.             end
  435.         end
  436.     end
  437.     return torso, dist
  438. end
  439.  
  440. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  441.     if hit.Parent == nil then
  442.         return
  443.     end
  444.     local h = hit.Parent:FindFirstChild("Humanoid")
  445.     for _, v in pairs(hit.Parent:children()) do
  446.         if v:IsA("Humanoid") then
  447.             h = v
  448.         end
  449.     end
  450.     if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  451.         if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  452.             if hit.Parent.DebounceHit.Value == true then
  453.                 return
  454.             end
  455.         end
  456.         local c = Create("ObjectValue"){
  457.             Name = "creator",
  458.             Value = game:service("Players").LocalPlayer,
  459.             Parent = h,
  460.         }
  461.         game:GetService("Debris"):AddItem(c, .5)
  462.         if HitSound ~= nil and HitPitch ~= nil and HitSound ~= "" then
  463.             CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  464.         end
  465.         local Damage = math.random(minim, maxim)
  466.         local blocked = false
  467.         local block = hit.Parent:findFirstChild("Block")
  468.         if block ~= nil then
  469.             if block.className == "IntValue" then
  470.                 if block.Value > 0 then
  471.                     blocked = true
  472.                     block.Value = block.Value - 1
  473.                     print(block.Value)
  474.                 end
  475.             end
  476.         end
  477.         if blocked == false then
  478.             h.Health = h.Health - Damage
  479.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  480.         else
  481.             h.Health = h.Health - (Damage / 2)
  482.             ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  483.         end
  484.         if Type == "Knockdown" then
  485.             local hum = hit.Parent.Humanoid
  486.             hum.PlatformStand = true
  487.             coroutine.resume(coroutine.create(function(HHumanoid)
  488.                 swait(1)
  489.                 HHumanoid.PlatformStand = false
  490.             end), hum)
  491.             local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  492.             local bodvol = Create("BodyVelocity"){
  493.                 velocity = angle * knockback,
  494.                 P = 5000,
  495.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  496.                 Parent = hit,
  497.             }
  498.             local rl = Create("BodyAngularVelocity"){
  499.                 P = 3000,
  500.                 maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  501.                 angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  502.                 Parent = hit,
  503.             }
  504.             game:GetService("Debris"):AddItem(bodvol, .5)
  505.             game:GetService("Debris"):AddItem(rl, .5)
  506.         elseif Type == "Normal" then
  507.             local vp = Create("BodyVelocity"){
  508.                 P = 500,
  509.                 maxForce = Vector3.new(math.huge, 0, math.huge),
  510.                 velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  511.             }
  512.             if knockback > 0 then
  513.                 vp.Parent = hit.Parent.Torso
  514.             end
  515.             game:GetService("Debris"):AddItem(vp, .5)
  516.         elseif Type == "Up" then
  517.             local bodyVelocity = Create("BodyVelocity"){
  518.                 velocity = Vector3.new(0, 20, 0),
  519.                 P = 5000,
  520.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  521.                 Parent = hit,
  522.             }
  523.             game:GetService("Debris"):AddItem(bodyVelocity, .5)
  524.         elseif Type == "DarkUp" then
  525.             coroutine.resume(coroutine.create(function()
  526.                 for i = 0, 1, 0.1 do
  527.                     swait()
  528.                     Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  529.                 end
  530.             end))
  531.             local bodyVelocity = Create("BodyVelocity"){
  532.                 velocity = Vector3.new(0, 20, 0),
  533.                 P = 5000,
  534.                 maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  535.                 Parent = hit,
  536.             }
  537.             game:GetService("Debris"):AddItem(bodyVelocity, 1)
  538.         elseif Type == "Snare" then
  539.             local bp = Create("BodyPosition"){
  540.                 P = 2000,
  541.                 D = 100,
  542.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  543.                 position = hit.Parent.Torso.Position,
  544.                 Parent = hit.Parent.Torso,
  545.             }
  546.             game:GetService("Debris"):AddItem(bp, 1)
  547.         elseif Type == "Freeze" then
  548.             local BodPos = Create("BodyPosition"){
  549.                 P = 50000,
  550.                 D = 1000,
  551.                 maxForce = Vector3.new(math.huge, math.huge, math.huge),
  552.                 position = hit.Parent.Torso.Position,
  553.                 Parent = hit.Parent.Torso,
  554.             }
  555.             local BodGy = Create("BodyGyro") {
  556.                 maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  557.                 P = 20e+003,
  558.                 Parent = hit.Parent.Torso,
  559.                 cframe = hit.Parent.Torso.CFrame,
  560.             }
  561.             hit.Parent.Torso.Anchored = true
  562.             coroutine.resume(coroutine.create(function(Part)
  563.                 swait(1.5)
  564.                 Part.Anchored = false
  565.             end), hit.Parent.Torso)
  566.             game:GetService("Debris"):AddItem(BodPos, 3)
  567.             game:GetService("Debris"):AddItem(BodGy, 3)
  568.         end
  569.         local debounce = Create("BoolValue"){
  570.             Name = "DebounceHit",
  571.             Parent = hit.Parent,
  572.             Value = true,
  573.         }
  574.         game:GetService("Debris"):AddItem(debounce, Delay)
  575.         c = Create("ObjectValue"){
  576.             Name = "creator",
  577.             Value = Player,
  578.             Parent = h,
  579.         }
  580.         game:GetService("Debris"):AddItem(c, .5)
  581.     end
  582. end
  583.  
  584. function ShowDamage(Pos, Text, Time, Color)
  585.     local Rate = (1 / 30)
  586.     local Pos = (Pos or Vector3.new(0, 0, 0))
  587.     local Text = (Text or "")
  588.     local Time = (Time or 2)
  589.     local Color = (Color or Color3.new(1, 0, 1))
  590.     local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  591.     EffectPart.Anchored = true
  592.     local BillboardGui = Create("BillboardGui"){
  593.         Size = UDim2.new(3, 0, 3, 0),
  594.         Adornee = EffectPart,
  595.         Parent = EffectPart,
  596.     }
  597.     local TextLabel = Create("TextLabel"){
  598.         BackgroundTransparency = 1,
  599.         Size = UDim2.new(1, 0, 1, 0),
  600.         Text = Text,
  601.         Font = "SourceSansBold", --"SciFi",
  602.         TextColor3 = Color,
  603.         TextScaled = true,
  604.         Parent = BillboardGui,
  605. TextStrokeTransparency = 0;
  606. TextColor3 = BrickColor.new("Bright red").Color
  607.     }
  608.     game.Debris:AddItem(EffectPart, (Time))
  609.     EffectPart.Parent = game:GetService("Workspace")
  610.     delay(0, function()
  611.         local Frames = (Time / Rate)
  612.         for Frame = 1, Frames do
  613.             wait(Rate)
  614.             local Percent = (Frame / Frames)
  615.             EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  616.             TextLabel.TextTransparency = Percent
  617.         end
  618.         if EffectPart and EffectPart.Parent then
  619.             EffectPart:Destroy()
  620.         end
  621.     end)
  622. end
  623.  
  624. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  625.             for _, c in pairs(workspace:children()) do
  626.         local hum = c:findFirstChild("Humanoid")
  627.         if hum ~= nil then
  628.             local head = c:findFirstChild("Torso")
  629.             if head ~= nil then
  630.                 local targ = head.Position - Part.Position
  631.                 local mag = targ.magnitude
  632.                 if mag <= Magnitude and c.Name ~= Player.Name then
  633.                     Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, HitSound, HitPitch)
  634.                 end
  635.             end
  636.         end
  637.     end
  638. end
  639.  
  640. Scarf=CFuncs.Part.Create(m,Enum.Material.Plastic,0,0,"Deep orange","Scarf",Vector3.new(0.799999952, 1.31999993, 0.300000012))
  641. ScarfWeld=CFuncs.Weld.Create(m,Character["Torso"],Scarf,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.900345325, 0.0133297443, -0.236809194, -0.132070467, 0.942751229, -0.306250393, -0.991241395, -0.125295743, 0.0417691357, 0.00100507634, 0.309091687, 0.951040387))
  642. Part=CFuncs.Part.Create(m,Enum.Material.Plastic,0,0,"Deep orange","Part",Vector3.new(0.450000167, 1.31999993, 0.200000003))
  643. PartWeld=CFuncs.Weld.Create(m,Scarf,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.448828101, 1.48438907, -0.581684828, -0.122507468, 0.0839952603, -0.988906801, 0.991185546, 0.0609859526, -0.117609747, 0.0504307672, -0.99459821, -0.0907261148))
  644. CFuncs.Mesh.Create("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=114046169",Vector3.new(0, 0, 0),Vector3.new(0.450000167, 1.31999993, 0.200000003))
  645. CFuncs.Mesh.Create("SpecialMesh",Scarf,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=114046169",Vector3.new(0, 0, 0),Vector3.new(0.25, 0.699999988, 0.5))
  646. Part=CFuncs.Part.Create(m,Enum.Material.Plastic,0,0,"Deep orange","Part",Vector3.new(0.899999976, 1.31999993, 0.200000003))
  647. PartWeld=CFuncs.Weld.Create(m,Scarf,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.110334158, 0.307615757, 0.461534977, -0.116537027, -0.0203127619, -0.992978632, -0.445258886, 0.894757986, 0.0339525454, 0.887785792, 0.446089357, -0.113316871))
  648. CFuncs.Mesh.Create("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=114046169",Vector3.new(0, 0, 0),Vector3.new(0.5, 0.5, 0.5))
  649. Handle=CFuncs.Part.Create(m,Enum.Material.Plastic,0,0,"Deep orange","Handle",Vector3.new(0.969999969, 1.28000212, 0.919999957))
  650. HandleWeld=CFuncs.Weld.Create(m,Scarf,Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.153196692, 0.977530241, 0.0762317181, 0.0378966779, 0.999098003, -0.0191554129, 0.991192698, -0.0400171205, -0.126237094, -0.12688978, -0.0142027354, -0.991815209))
  651. CFuncs.Mesh.Create("SpecialMesh",Handle,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=99856331 ",Vector3.new(0, 0, 0),Vector3.new(0.969999969, 1.28000212, 0.919999957))
Advertisement
Add Comment
Please, Sign In to add comment