Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --LOCAL
- --Started on 4/2/2016 12:49Pm
- --Ended main creation on 4/3/2016 8:19Am
- --[[Created by:
- Elemental_Code(Animator) and gruntmaster1217(Builder)
- ]]--
- --[[Run this in a server script: require(392895346)]]--
- --[[Once it's loaded, just run this as a local and done.]]--
- --
- local speed = 0.1
- local angle = 0
- local anglespeed = 2
- local armspeed = 0.1
- local armangle = 0
- local armanglespeed = 2
- local legspeed = 0.1
- local legangle = 0
- local leganglespeed = 2
- local sine = 0
- local change = .5
- action = "Idle"
- on = false
- enabled = true
- damen = false
- jumping = false
- falling = false
- combo = 1
- plr = game.Players.LocalPlayer
- char = plr.Character
- human = char.Humanoid
- human:ClearAllChildren()
- human.WalkSpeed = 3
- mouse = plr:GetMouse()
- local face = char.Head.face
- local tex = face.Texture
- local PartColors = {"Black", "Cyan", "Institutional white","Pink","Gold","Dark red","Fossil","Royal purple"}
- local ButtonColors = {"White"; "Cyan";}
- T = char:findFirstChild("Torso")
- Head = char.Head
- LA = char:findFirstChild("Left Arm")
- RA = char:findFirstChild("Right Arm")
- LL = char:findFirstChild("Left Leg")
- RL = char:findFirstChild("Right Leg")
- LS = T:findFirstChild("Left Shoulder")
- RS = T:findFirstChild("Right Shoulder")
- LH = T:findFirstChild("Left Hip")
- RH = T:findFirstChild("Right Hip")
- Neck = T:findFirstChild("Neck")
- HM = char:findFirstChild("HumanoidRootPart")
- RJ = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
- WLS = Instance.new("Weld", LA)
- WLS.C0 = CFrame.new(-1.5, 0.5, 0)
- WLS.C1 = CFrame.new(0, 0.5, 0)
- WLS.Part0 = T
- WLS.Part1 = LA
- WRS = Instance.new("Weld", RA)
- WRS.Part0 = T
- WRS.Part1 = RA
- WRS.C0 = CFrame.new(1.5, 0.5, 0)
- WRS.C1 = CFrame.new(0, 0.5, 0)
- WLH = LH
- WRH = RH
- LSC0 = WLS.C0
- RSC0 = WRS.C0
- LHC0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- WRJ = Instance.new("Weld", HM)
- WRJ.Part0 = T
- WRJ.Part1 = HM
- WRJ.C0 = CFrame.new()
- WRJ.C1 = CFrame.new()
- RJC0 = WRJ.C0
- NC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- Run = game:GetService("RunService")
- game.ReplicatedStorage.VapePen:Clone().Parent = char
- vpen = char:WaitForChild("VapePen")
- button = vpen.Button
- local vweld = Instance.new("Weld", RA)
- vweld.Part0 = RA
- vweld.Part1 = vpen.MouthPeice
- vweld.C0 = CFrame.new(-.2,-1.08,.6) * CFrame.Angles(math.rad(90),math.rad(180),math.rad(0))
- PlaySound = function(part,volume,pitch,id)
- local Sound = Instance.new("Sound", part)
- Sound.SoundId = id
- Sound.Pitch = pitch
- Sound.Volume = volume
- Sound:Play()
- Sound:remove()
- end
- for i,v in pairs(char.Head:GetChildren()) do
- if v:IsA("Sound") then
- v:Destroy()
- end
- end
- function Rwait(long)
- if long == 0 or long == nil then
- Run.RenderStepped:wait()
- else
- for i = 0,long do
- Run.RenderStepped:wait()
- end
- end
- end
- function lerp(weld,beglerp,endlerp,speed)
- weld.C0 = beglerp:lerp(endlerp,speed)
- return weld.C0
- end
- function Hit()
- PlaySound(char.Head, 1, .4, "http://www.roblox.com/asset/?id=163317429")
- face.Texture = "http://www.roblox.com/asset/?id=161066584"
- human.WalkSpeed = 0
- button.Material = "Neon"
- vpen.TipPart.Reflectance = 0
- for i = 1,45 do
- lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.rad(-20),math.rad(0),-math.rad(20)),.05)
- lerp(WRS,WRS.C0,CFrame.new(1.2, 0.5, 0) *CFrame.Angles(math.rad(115.3),-math.rad(30),-math.rad(70)),.05)
- lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(-math.rad(2),0,math.rad(15)),.05)
- lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(-math.rad(2),0,math.rad(-15)),.05)
- lerp(WRJ,WRJ.C0,RJC0 * CFrame.Angles(math.rad(-15), math.rad(0), math.rad(0)),.05)
- lerp(Neck,Neck.C0,NC0* CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),.05)
- vweld.C0 = CFrame.new(.2,-1.05,-.1)* CFrame.Angles(math.rad(0),math.rad(-180),math.rad(-70))
- Rwait()
- end
- while button.Material == "Neon" do
- wait()
- vpen.TipPart.BrickColor = BrickColor.random()
- end
- end
- function EndHit(time)
- for i = 1,25 do
- lerp(WLS,WLS.C0,LSC0 *CFrame.new(math.rad(1.5),math.rad(10), math.rad(0)) *CFrame.Angles(-math.rad(-10),0,math.rad(-20)),.05)
- lerp(WRS,WRS.C0,RSC0 *CFrame.new(math.rad(1.5),math.rad(10), math.rad(0)) *CFrame.Angles(-math.rad(5),0,math.rad(50)),.008)
- lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(-math.rad(7),0,math.rad(-5)),.05)
- lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(-math.rad(7),0,math.rad(-5)),.05)
- lerp(WRJ,WRJ.C0,RJC0 * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),.05)
- lerp(Neck,Neck.C0,NC0* CFrame.Angles(math.rad(-30), math.rad(0), math.rad(0)),.05)
- vweld.C0 = CFrame.new(.1,-1.05,-.15)* CFrame.Angles(math.rad(0),math.rad(-250),math.rad(-90))
- Rwait()
- end
- vpen.TipPart.BrickColor = BrickColor.new("Fossil")
- vpen.TipPart.Reflectance = 1
- button.Material = "SmoothPlastic"
- vpen.TipPart.Material = "SmoothPlastic"
- local p = Instance.new("Part", char)
- p.Size = Vector3.new(1,1,1)
- p.CanCollide = false
- p.Anchored = true
- p.Transparency = 1
- --local pw = Instance.new("Weld", p)
- --p.Part0 = p
- --p.Part1 = char.Head
- Run.RenderStepped:connect(function()
- p.CFrame = char.Head.CFrame * CFrame.new(0,.1,-1)*CFrame.Angles(-89.5,0,0)
- end)
- local s = Instance.new("Smoke", p)
- s.Opacity = 1
- t = time
- s.Size = time/100
- --s.RiseVelocity = t - 10/2
- s.RiseVelocity = 5
- if time <10 then
- s.RiseVelocity = 5
- elseif time >30 then
- s.RiseVelocity = 8
- end
- for i = 1,5 do
- s.Size = s.Size - .05
- end
- wait(3)
- for i = 1,20 do
- s.Opacity = s.Opacity - .1
- wait()
- end
- s:remove()
- p:remove()
- -- dem:disconnect()
- human.WalkSpeed = 3
- enabled = true
- face.Texture = tex
- end
- time = 0
- function Selected()
- click = mouse.Button1Down:connect(function()
- if combo == 1 and on == true and enabled == true then
- enabled = false
- Hit()
- while enabled == false do
- time = time+.1
- print(time)
- wait()
- end
- end
- end)
- up = mouse.Button1Up:connect(function()
- if combo == 1 and on == true and enabled == false then
- if time <1 then
- enabled = true
- human.WalkSpeed = 3
- face.Texture = tex
- print(time)
- else
- otime = time
- time = 0
- EndHit(otime)
- enabled = true
- end
- end
- end)
- on = true--<<
- end
- function Deselected()
- click:disconnect()
- up:disconnect()
- end
- vpen.Battery.BrickColor = BrickColor.new(PartColors[math.random(1,#PartColors)])
- vpen.Button.BrickColor = BrickColor.new("Cyan")
- Selected()
- plr.Chatted:connect(function(msg)
- if msg:sub(0,3) == "/c " then
- local newcol = msg:sub(4)
- vpen.Battery.BrickColor = BrickColor.new(newcol)
- --vpen.Button.BrickColor = BrickColor.new(newcol)
- end
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- if on == true then
- angle = (angle % 100) +anglespeed/10
- armangle = (armangle % 100) +armanglespeed/10
- legangle = (legangle % 100) +leganglespeed/10
- sine = sine + change
- if action == "Idle" and enabled == true then
- lerp(WLS,WLS.C0,LSC0 *CFrame.new(math.rad(1.5),math.cos(sine/14)*math.rad(-4), math.rad(0)) *CFrame.Angles(-math.rad(5),0,math.rad(-10)),.05)
- lerp(WRS,WRS.C0,RSC0 *CFrame.new(math.rad(1.5),math.cos(sine/14)*math.rad(-4), math.rad(0)) *CFrame.Angles(-math.rad(5),0,math.rad(10)),.05)
- lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(-math.rad(7),0,math.cos(sine/14)*-.02),.05)
- lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(-math.rad(7),0,math.cos(sine/14)*.02),.05)
- lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,0,0)*CFrame.Angles(math.cos(sine/14)*.02,.25,0),.05)
- lerp(Neck,Neck.C0,NC0*CFrame.Angles(math.rad(0),math.rad(0),math.rad(10)),speed)--Was 30
- vweld.C0 = CFrame.new(-.2,-1.08,.6) * CFrame.Angles(math.rad(90),math.rad(180),math.rad(0))
- end
- if action == "Walk" and enabled == true then
- lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.cos(sine/5)*-math.rad(30),0,math.rad(-10)),.3)
- lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.cos(sine/5)*-math.rad(-30),0,math.rad(10)),.3)
- lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(-math.rad(3.5),0,math.cos(sine/5)*-math.rad(30)),.7)
- lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(-math.rad(3.5),0,math.cos(sine/5)*-math.rad(30)),.7)
- lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(math.rad(5),math.rad(360),math.rad(360)),speed)
- vweld.C0 = CFrame.new(-.2,-1.08,.6) * CFrame.Angles(math.rad(90),math.rad(180),math.rad(0))
- lerp(Neck,Neck.C0,NC0,speed)
- end
- if HM.Velocity.Y >= 1 and enabled == true then
- action = "Jump"
- jumping = true
- lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.rad(25),0,0),armspeed)
- lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.rad(25),0,0),armspeed)
- lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.rad(20)),legspeed)
- lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,-math.rad(20)),legspeed)
- lerp(WRJ,WRJ.C0,RJC0,speed)
- lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/8,0,0),speed)
- vweld.C0 = CFrame.new(-.2,-1.08,.6) * CFrame.Angles(math.rad(90),math.rad(180),math.rad(0))
- Rwait()
- end
- if HM.Velocity.Y <= -1 and enabled == true then
- action = "Fall"
- falling = true
- lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.rad(10),0,-20),armspeed)
- lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.rad(10),0,20),armspeed)
- lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.rad(20)),legspeed)
- lerp(WRH,WRH.C0,RHC0 *CFrame.new(math.rad(90), math.rad(90), math.rad(0))*CFrame.Angles(0,0,math.cos(20)),.05)
- lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(math.pi/20,0,0),speed)
- lerp(Neck,Neck.C0,NC0*CFrame.Angles(math.cos(70),0,0),speed)
- vweld.C0 = CFrame.new(-.2,-1.08,.6) * CFrame.Angles(math.rad(90),math.rad(180),math.rad(0))
- Rwait()
- end
- if Vector3.new(T.Velocity.X,0,T.Velocity.Z).magnitude <= 2 then
- action = "Idle"
- elseif Vector3.new(T.Velocity.X,0,T.Velocity.Z).magnitude <= 20 then
- action = "Walk"
- end
- end
- Rwait()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement