Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Made pretty quickly kinda shat but I'm bored--
- local player = game.Players.LocalPlayer
- local char = player.Character
- local tor = char.Torso
- local mouse = player:GetMouse()
- local camera = game.Workspace.CurrentCamera
- local ra = char['Right Arm']
- local la = char['Left Arm']
- local ll = char['Left Leg']
- local rl = char['Right Leg']
- function weld(p0,p1,c0)
- local w=Instance.new("Weld",p0)
- w.Part0=p0
- w.Part1=p1
- w.C0=c0
- return w
- end
- function animate(part,speed,cframe,corout)
- coroutine.resume(coroutine.create(function()
- local startCFrame = part.Weld.C0
- local endCFrame = cframe
- for i = 0,1,speed do wait()
- part.Weld.C0 = startCFrame:lerp(endCFrame,i)
- end
- end))
- end
- function animate2(part,speed,cframe,corout)
- local startCFrame = part.Weld.C0
- local endCFrame = cframe
- for i = 0,1,speed do wait()
- part.Weld.C0 = startCFrame:lerp(endCFrame,i)
- end
- end
- function bleed(victim,speed,amount,velocity)
- coroutine.resume(coroutine.create(function()
- for i = 1,amount do wait(speed)
- local blood = Instance.new("Part",workspace)
- blood.CanCollide = false
- blood.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- blood.Transparency = 0
- blood.Anchored= false
- blood.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- blood.Material = Enum.Material.Metal
- blood.Size = Vector3.new(0.3, 0.3, 0.3)
- blood.Name = "blood"
- blood.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- blood.Position = victim.Position
- blood.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- blood.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- blood.BrickColor = BrickColor.new("Crimson")
- blood.Friction = 0.3
- blood.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- blood.Transparency = 0
- if velocity == nil then
- blood.Velocity = victim.CFrame.lookVector * -30 + Vector3.new(math.random(-10,10),20,math.random(-10,10))
- end
- if velocity ~=nil then
- blood.Velocity = victim.CFrame.lookVector * velocity + Vector3.new(math.random(-10,10),20,math.random(-10,10))
- end
- blood.RotVelocity = Vector3.new(0,200,0)
- blood.Touched:connect(function(h)
- if (not h:isDescendantOf(victim.Parent)) then
- if h.Name ~= "blood" and h.Name ~="puddle" and h.Name ~="Bolt" and h.Name ~="BoltFront" and h.Parent:FindFirstChild("Humanoid")==nil then
- local debounce = false
- if debounce == false then
- debounce = true
- print(h)
- local puddle = Instance.new("Part", workspace)
- puddle.FormFactor = Enum.FormFactor.Plate
- puddle.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- puddle.Transparency = 0.3
- puddle.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- puddle.Anchored = false
- puddle.CanCollide = true
- puddle.Material = Enum.Material.Metal
- puddle.Size = Vector3.new(2, 0.1, 2)
- puddle.Name = "puddle"
- puddle.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- puddle.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- puddle.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- puddle.BrickColor = BrickColor.new("Crimson")
- puddle.Friction = 0.3
- puddle.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- puddle.Position = blood.Position
- local mesh = Instance.new("CylinderMesh", puddle)
- blood:Destroy()
- wait(1)
- puddle.Anchored = true
- puddle.CanCollide = false
- game.Debris:AddItem(puddle,8)
- coroutine.resume(coroutine.create(function()
- wait(.5)
- while puddle~=nil do wait(.5)
- puddle.Mesh.Scale = puddle.Mesh.Scale - Vector3.new(0,0,.1)
- puddle.Transparency = puddle.Transparency + .05
- end
- end))
- end
- end
- end
- end)
- end
- end))
- end
- local powergui = Instance.new("GuiMain", player.PlayerGui)
- powergui.Name = "PowerGui"
- local tray = Instance.new("Frame", powergui)
- tray.Size = UDim2.new(0, 250, 0, 18)
- tray.SizeConstraint = Enum.SizeConstraint.RelativeYY
- tray.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- tray.Name = "Tray"
- tray.Position = UDim2.new(0.5, -130, 1, -22)
- tray.BackgroundTransparency = 1
- tray.BackgroundColor3 = Color3.new(0.666667, 0, 0)
- local background = Instance.new("TextBox", tray)
- background.FontSize = Enum.FontSize.Size14
- background.Active = false
- background.BorderSizePixel = 2
- background.BackgroundColor3 = Color3.new(0, 0, 0)
- background.Position = UDim2.new(0, 0, 0, -1)
- background.Size = UDim2.new(0, 253, 0, 21)
- background.BackgroundTransparency = 0.5
- background.BorderColor3 = Color3.new(0, 0, 0)
- background.Text = ""
- background.TextColor3 = Color3.new(1, 1, 1)
- background.Font = Enum.Font.SourceSans
- background.Name = "Background"
- background.ClearTextOnFocus = false
- local bar = Instance.new("TextBox", tray)
- bar.FontSize = Enum.FontSize.Size14
- bar.Active = false
- bar.BorderSizePixel = 0
- bar.BackgroundColor3 = Color3.new(0, 0.333333, 0)
- bar.Position = UDim2.new(0.019, 0, 0.1, 0)
- bar.Size = UDim2.new(0.97, 0, 0.8, 0)
- bar.BackgroundTransparency = 0.25
- bar.BorderColor3 = Color3.new(1, 1, 1)
- bar.Text = ""
- bar.TextColor3 = Color3.new(1, 1, 1)
- bar.Font = Enum.Font.SourceSans
- bar.Name = "Bar"
- bar.ClearTextOnFocus = false
- local powertext = Instance.new("TextBox", tray)
- powertext.FontSize = Enum.FontSize.Size14
- powertext.Active = false
- powertext.ZIndex = 3
- powertext.BorderSizePixel = 0
- powertext.BackgroundColor3 = Color3.new(0, 0.333333, 0)
- powertext.Position = UDim2.new(0.019, 0, 0.1, 0)
- powertext.Size = UDim2.new(0.97, 0, 0.8, 0)
- powertext.BackgroundTransparency = 1
- powertext.BorderColor3 = Color3.new(0, 0, 0)
- powertext.Text = "Power"
- powertext.TextColor3 = Color3.new(1, 1, 1)
- powertext.Font = Enum.Font.SourceSans
- powertext.Name = "Power"
- powertext.ClearTextOnFocus = false
- ---Clothing------------------------------------------------------
- wait(1)
- if char:FindFirstChild("Shirt") then
- char.Shirt:Destroy()
- end
- if char:FindFirstChild("Pants") then
- char.Pants:Destroy()
- end
- if char:FindFirstChild("Shirt Graphic") then
- char["Shirt Graphic"]:Destroy()
- end
- if char.Torso:FindFirstChild("roblox") then
- char.Torso.roblox:Destroy()
- end
- local hid0r = char:GetChildren()
- for i=1, #hid0r do
- if (hid0r[i].className == "Accessory") then hid0r[i]:remove()
- end
- end
- local Shirt = Instance.new("Shirt",char)
- Shirt.Name = "Shirt"
- local Pants = Instance.new("Pants",char)
- Pants.Name = "Pants"
- Shirt.ShirtTemplate = "rbxassetid://543661079"
- Pants.PantsTemplate = "rbxassetid://543662444"
- local helmet = Instance.new("Part", char)
- helmet.FormFactor = Enum.FormFactor.Symmetric
- helmet.TopSurface = Enum.SurfaceType.Smooth
- helmet.Anchored = false
- helmet.Size = Vector3.new(1, 1, 1)
- helmet.Name = "Helmet"
- helmet.Friction = 0.3
- helmet.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh", helmet)
- mesh.MeshId = "rbxassetid://502620459"
- mesh.TextureId = "rbxassetid://502620602"
- mesh.MeshType = Enum.MeshType.FileMesh
- mesh.Scale = Vector3.new(0.08, 0.06, 0.06)
- char.Head.BrickColor = BrickColor.new("Really black")
- if char.Head:FindFirstChild("face") then
- char.Head.face:Destroy()
- end
- weld(helmet, char.Head, CFrame.new(0,-.1,-.1)*CFrame.Angles(math.rad(90),0,math.rad(0)))
- -----------------------------------------------------------------
- local handle = Instance.new("Part", char)
- handle.FormFactor = Enum.FormFactor.Plate
- handle.TopSurface = Enum.SurfaceType.Smooth
- handle.Size = Vector3.new(1, 0.4, 3)
- handle.Name = "Handle"
- handle.BrickColor = BrickColor.new("Institutional white")
- handle.Friction = 0.3
- handle.BottomSurface = Enum.SurfaceType.Smooth
- handle.CanCollide = false
- mesh = Instance.new("SpecialMesh", handle)
- mesh.Scale = Vector3.new(0.6, 0.6, 0.6)
- mesh.MeshId = "http://www.roblox.com/asset/?id=15886761"
- mesh.TextureId = "http://www.roblox.com/asset/?id=15886781"
- mesh.MeshType = Enum.MeshType.FileMesh
- weld(handle, tor, CFrame.new(0,.8,0)*CFrame.Angles(math.rad(90),0,math.rad(60)))
- local sheaths = Instance.new("Sound")
- sheaths.SoundId="http://www.roblox.com/asset/?id=211134014"
- sheaths.PlayOnRemove=false
- sheaths.Volume=0.8
- sheaths.Looped=false
- sheaths.Pitch = 1
- sheaths.MaxDistance = 60
- sheaths.Parent=handle
- local unsheaths = Instance.new("Sound")
- unsheaths.SoundId="http://www.roblox.com/asset/?id=609342907"
- unsheaths.PlayOnRemove=false
- unsheaths.Volume=0.8
- unsheaths.Looped=false
- unsheaths.Pitch = 1
- unsheaths.MaxDistance = 60
- unsheaths.Parent=handle
- local reloadsound = Instance.new("Sound")
- reloadsound.SoundId="http://www.roblox.com/asset/?id=609345653"
- reloadsound.PlayOnRemove=false
- reloadsound.Volume=0.8
- reloadsound.Looped=false
- reloadsound.Pitch = 1
- reloadsound.MaxDistance = 60
- reloadsound.Parent=handle
- local firesound = Instance.new("Sound")
- firesound.SoundId="http://www.roblox.com/asset/?id=609347009"
- firesound.PlayOnRemove=false
- firesound.Volume=0.8
- firesound.Looped=false
- firesound.Pitch = 1
- firesound.MaxDistance = 60
- firesound.Parent=handle
- local vult = Instance.new("Sound")
- vult.SoundId="http://www.roblox.com/asset/?id=585548493"
- vult.PlayOnRemove=false
- vult.Volume=0.8
- vult.Looped=false
- vult.Pitch = 1
- vult.MaxDistance = 60
- vult.Parent=char.Head
- local torso = char.Torso:Clone()
- torso.Size = Vector3.new(char.Torso.Size.x,char.Torso.Size.y,char.Torso.Size.z)
- torso.Transparency = 0
- torso.CanCollide = false
- if torso:FindFirstChild("roblox") then torso.roblox:Remove() end
- torso.Parent = char
- torso.CanCollide = true
- torso.Name = "Torso"
- torso["Left Shoulder"]:Destroy()
- torso["Right Shoulder"]:Destroy()
- torso["Left Hip"]:Destroy()
- torso["Right Hip"]:Destroy()
- char.Torso.Transparency = 1
- char.Torso.Name = "Torso2"
- local tweld = Instance.new("Weld",char.Torso)
- tweld.Name = "Weld"
- tweld.Part0 = char.Torso
- tweld.Part1 = char.Torso2
- tweld.C0 = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
- char.Torso2.Name = "Torso"
- function unsheath()
- tor["Right Shoulder"].Part1 = nil
- tor["Left Shoulder"].Part1 = nil
- weld(ra, tor, CFrame.new(-1.5,0,0)*CFrame.Angles(math.rad(0),0,0))
- weld(la, tor, CFrame.new(1.5,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0))
- wait()
- animate(ra,.2,CFrame.new(-1.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- wait(.2)
- animate(ra,.2,CFrame.new(-1.5,-1,-.8)*CFrame.Angles(math.rad(-70),math.rad(-160),0))
- wait(.2)
- handle.Weld:Destroy()
- weld(handle, ra, CFrame.new(0,0,-1.4)*CFrame.Angles(math.rad(-180),math.rad(-90),math.rad(-90)))
- wait(.2)
- unsheaths:Play()
- animate(ra,.2,CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-90),math.rad(-10),0))
- animate(la,.2,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- handle.Weld.C0 = CFrame.new(0,-.4,-.8)*CFrame.Angles(math.rad(-90),math.rad(180),math.rad(0))
- end
- function sheathe()
- animate(ra,.2,CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-90),math.rad(-20),0))
- animate(la,.2,CFrame.new(1.5,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0))
- wait()
- animate(ra,.2,CFrame.new(-1.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- wait(.2)
- animate(ra,.2,CFrame.new(-1.5,-1,-.8)*CFrame.Angles(math.rad(-70),math.rad(-160),0))
- wait(.2)
- sheaths:Play()
- handle.Weld:Destroy()
- weld(handle, tor, CFrame.new(0,.8,0)*CFrame.Angles(math.rad(90),0,math.rad(60)))
- wait(.2)
- animate(ra,.2,CFrame.new(-1.5,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0))
- wait(.2)
- if la:FindFirstChild("Weld") then la.Weld:Destroy() end
- tor["Left Shoulder"].Part1 = la
- if ra:FindFirstChild("Weld") then ra.Weld:Destroy() end
- tor["Right Shoulder"].Part1 = ra
- if rl:FindFirstChild("Weld") then rl.Weld:Destroy() end
- tor["Right Hip"].Part1 = rl
- end
- fpressed = 0
- mouse.KeyDown:connect(function(key)
- if key == "f" then
- fpressed = fpressed + 1
- if fpressed == 1 then
- unsheath()
- end
- if fpressed == 2 then
- fpressed = 0
- sheathe()
- end
- end
- end)
- local ammo = 0
- local cooldown = false
- function reload()
- cooldown = true
- weld(char.Head, torso, CFrame.new(0,-1.5,0)*CFrame.Angles(math.rad(0),0,0))
- char.Head.Weld.Name = "Weld2"
- animate(torso,.2,CFrame.new(0,0,.3)*CFrame.Angles(math.rad(20),math.rad(0),0))
- animate(ra,.2,CFrame.new(-1.5,1.5,0)*CFrame.Angles(math.rad(-20),math.rad(-10),0))
- animate(la,.2,CFrame.new(-.5,2,0)*CFrame.Angles(math.rad(-20),math.rad(0),0))
- wait(.2)
- animate(la,.2,CFrame.new(-.5,2,.5)*CFrame.Angles(math.rad(-20),math.rad(0),0))
- wait(.2)
- animate(la,.2,CFrame.new(-.5,2,.5)*CFrame.Angles(math.rad(-30),math.rad(20),0))
- wait(.2)
- reloadsound:Play()
- animate(la,.2,CFrame.new(-.5,1.5,.5)*CFrame.Angles(math.rad(-30),math.rad(20),0))
- wait(.4)-- wait(.6)
- animate(la,.2,CFrame.new(-.5,2,.5)*CFrame.Angles(math.rad(-30),math.rad(20),0))
- local boltmodel = Instance.new("Model",char)
- boltmodel.Name = "BoltModel"
- local bolt = Instance.new("Part", boltmodel)
- bolt.FormFactor = Enum.FormFactor.Plate
- bolt.TopSurface = Enum.SurfaceType.Smooth
- bolt.Velocity = Vector3.new(-0.001, -0.006, -0.001)
- bolt.RotVelocity = Vector3.new(0, 0, -0.003)
- bolt.Size = Vector3.new(1, 0.4, 2)
- bolt.Name = "Bolt"
- bolt.CanCollide = false
- bolt.Anchored = false
- bolt.BrickColor = BrickColor.new("Dark stone grey")
- bolt.Friction = 0.3
- bolt.BottomSurface = Enum.SurfaceType.Smooth
- mesh = Instance.new("SpecialMesh", bolt)
- mesh.MeshId = "http://www.roblox.com/asset/?id=15887356"
- mesh.TextureId = "http://www.roblox.com/asset/?id=15886781"
- mesh.MeshType = Enum.MeshType.FileMesh
- local attach1 = Instance.new("Attachment",bolt)
- attach1.Name = "Attachment0"
- attach1.Position = Vector3.new(0,0,0)
- local attach2 = Instance.new("Attachment",bolt)
- attach2.Name = "Attachment1"
- attach2.Position = Vector3.new(0,0,.1)
- local trail = Instance.new("Trail",bolt)
- trail.Attachment0 = attach1
- trail.Attachment1 = attach2
- trail.Lifetime = 1
- trail.Enabled = false
- local boltfront = Instance.new("Part", boltmodel)
- boltfront.CanCollide = false
- boltfront.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- boltfront.Transparency = 1
- boltfront.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- boltfront.Material = Enum.Material.Metal
- boltfront.Size = Vector3.new(0.2, 0.2, 2)
- boltfront.Name = "BoltFront"
- boltfront.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- boltfront.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- boltfront.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- boltfront.BrickColor = BrickColor.new("Really black")
- boltfront.Friction = 0.3
- boltfront.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- weld(bolt, handle, CFrame.new(0,-.2,0)*CFrame.Angles(math.rad(0),0,math.rad(0)))
- weld(boltfront, bolt, CFrame.new(0,0,0)*CFrame.Angles(math.rad(180),0,math.rad(0)))
- --bolt.Weld.Name = "Weld2"
- --return--
- wait(.2)
- animate(la,.2,CFrame.new(-.5,2,.5)*CFrame.Angles(math.rad(-20),math.rad(0),0))
- wait(.2)
- animate(la,.2,CFrame.new(-.5,2,0)*CFrame.Angles(math.rad(-20),math.rad(0),0))
- wait(.2)
- animate(torso,.2,CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0))
- animate(ra,.2,CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-90),math.rad(-10),0))
- animate(la,.2,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- wait(.2)
- if char.Head:FindFirstChild("Weld") then char.Head.Weld:Destroy() end
- --tor["Neck"].Part1 = char.Head
- ammo = 1
- cooldown = false
- end
- mouse.KeyDown:connect(function(key)
- if key == "r" and ammo <=0 and cooldown == false and fpressed == 1 then
- reload()
- end
- end)
- function taunt()
- cooldown = true
- animate(la,.2,CFrame.new(1.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- wait(.2)
- animate(la,.2,CFrame.new(1.5,1.2,0)*CFrame.Angles(math.rad(-90),math.rad(20),0))
- vult:Play()
- wait(1)
- animate(la,.2,CFrame.new(1.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- wait(.5)
- animate(la,.2,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- cooldown = false
- end
- mouse.KeyDown:connect(function(key)
- if key == "t" and cooldown == false and fpressed == 1 then
- taunt()
- end
- end)
- local power = 0
- local maxpower = 300
- powertext.Text = "Power: ["..power.. "]/["..maxpower.."]"
- bar:TweenSize(UDim2.new(.97/(maxpower/power), 0, .8, 0), "InOut", "Quad", 1)
- function fire()
- cooldown = true
- firesound:Play()
- animate(ra,.2,CFrame.new(-1.5,-.5,0)*CFrame.Angles(math.rad(-90),math.rad(-10),0))
- animate(la,.2,CFrame.new(-.5,0,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- local BoltModel = char.BoltModel
- local bolt = char.BoltModel.Bolt
- local boltfront = char.BoltModel.BoltFront
- bolt.Trail.Enabled = true
- bolt.Weld:Destroy()
- bolt.CanCollide = false
- BoltModel.Parent = workspace
- game.Debris:AddItem(BoltModel,10)
- --bolt.Velocity = mouse.Hit.lookVector*300
- local Unit = (mouse.Hit.p - handle.Position).unit
- local bvelocity = Instance.new("BodyVelocity",bolt)
- bvelocity.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- bvelocity.velocity = Unit*power
- local bg = Instance.new('BodyGyro', bolt)
- bg.Name = 'Gyro'
- bg.CFrame = CFrame.new(-handle.CFrame.p, -mouse.Hit.p)
- bg.maxTorque= Vector3.new(math.huge, math.huge, math.huge)
- local debounce = false
- boltfront.Touched:connect(function(h)
- if (not h:isDescendantOf(char)) then
- if debounce == false then
- debounce = true
- if h.Name == "Hat" or h.Name == "Accessory" or h.Name == "Handle" then
- h:Destroy()
- end
- print(h)
- if h.Parent:FindFirstChild("Humanoid") then
- local hum = h.Parent.Humanoid
- hum:TakeDamage(power/4)
- bleed(h,0,1)
- bvelocity:Destroy()
- bg:Destroy()
- local weld = Instance.new("Weld")
- weld.Part0 = boltfront
- weld.Part1 = h
- -- correction term to account for average skew between physics update and heartbeat
- local HitPos = boltfront.Position --+ (-arrow.Velocity * (1/60)) --+ (arrow.CFrame.lookVector * .5)
- local CJ = CFrame.new(HitPos)
- local C0 = boltfront.CFrame:inverse() *CJ
- local C1 = h.CFrame:inverse() * CJ
- weld.C0 = C0
- weld.C1 = C1
- weld.Parent = boltfront
- if bolt:FindFirstChild("Trail") then
- bolt.Trail:Destroy()
- end
- local hitsound = Instance.new("Sound")
- hitsound.SoundId="rbxassetid://566593606"
- hitsound.PlayOnRemove=false
- hitsound.Volume=.5
- hitsound.MaxDistance = 60
- hitsound.Looped=false
- hitsound.Pitch = 1
- hitsound.Parent=bolt
- hitsound:Play()
- game.Debris:AddItem(hitsound,1)
- else
- bvelocity:Destroy()
- bg:Destroy()
- local weld = Instance.new("Weld")
- weld.Part0 = boltfront
- weld.Part1 = h
- -- correction term to account for average skew between physics update and heartbeat
- local HitPos = bolt.Position --+ (-arrow.Velocity * (1/60)) --+ (arrow.CFrame.lookVector * .5)
- local CJ = CFrame.new(HitPos)
- local C0 = boltfront.CFrame:inverse() *CJ
- local C1 = h.CFrame:inverse() * CJ
- weld.C0 = C0
- weld.C1 = C1
- weld.Parent = boltfront
- if bolt:FindFirstChild("Trail") then
- bolt.Trail:Destroy()
- end
- local hitsound = Instance.new("Sound")
- hitsound.SoundId="rbxassetid://743521337"
- hitsound.PlayOnRemove=false
- hitsound.Volume=.5
- hitsound.MaxDistance = 60
- hitsound.Looped=false
- hitsound.Pitch = 1
- hitsound.Parent=bolt
- hitsound:Play()
- game.Debris:AddItem(hitsound,1)
- game.Debris:AddItem(bolt,5)
- end
- end
- end
- end)
- wait(.2)
- animate(ra,.2,CFrame.new(-1.5,.5,0)*CFrame.Angles(math.rad(-90),math.rad(-10),0))
- animate(la,.2,CFrame.new(-.5,1,0)*CFrame.Angles(math.rad(-90),math.rad(0),0))
- ammo = 0
- cooldown = false
- end
- function aim()
- animate(la,.2,CFrame.new(-.5,.9,0)*CFrame.Angles(math.rad(-90),math.rad(10),0))
- end
- local mousedown = false
- mouse.Button1Down:connect(function()
- if fpressed == 1 and ammo >=1 and cooldown == false then
- mousedown = true
- aim()
- end
- while mousedown== true and power<maxpower do wait(.1)
- power = power + 20
- powertext.Text = "Power: ["..power.. "]/["..maxpower.."]"
- bar:TweenSize(UDim2.new(.97/(maxpower/power), 0, .8, 0), "InOut", "Quad", 1)
- end
- end)
- mouse.Button1Up:connect(function()
- if fpressed == 1 and ammo >=1 and cooldown == false then
- mousedown = false
- fire()
- power = 0
- powertext.Text = "Power: ["..power.. "]/["..maxpower.."]"
- bar:TweenSize(UDim2.new(.97/(maxpower/power), 0, .8, 0), "InOut", "Quad", 1)
- end
- end)
- --Health--
- wait()
- char.Humanoid.MaxHealth = 450
- wait()
- char.Humanoid.Health = 450
- ----------
Add Comment
Please, Sign In to add comment