Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Functions = loadstring(game:HttpGet("https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Functions.lua"))()
- local CustomShop = loadstring(game:HttpGet("https://raw.githubusercontent.com/RegularVynixu/Utilities/main/Doors/Custom%20Shop%20Items/Source.lua"))()
- -- Create your tool here
- local exampleTool = LoadCustomInstance("rbxassetid://11714080455") --The gun model id
- -- Create custom shop item
- CustomShop.CreateItem(exampleTool, {
- Title = "Candy cane gun",
- Desc = "*Tickles Pickle",
- Image = "https://cdn.discordapp.com/attachments/1041874959665991793/1047944359926050896/image-removebg-preview.png",
- Price = "fatty",
- Stack = 1,
- })
- local UIS = game:GetService("UserInputService")
- local tool = exampleTool
- local anim = Instance.new("Animation")
- anim.Name = "M249Idle"
- anim.AnimationId = "rbxassetid://3034291703"
- local track = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(anim)
- tool.Equipped:Connect(function()
- track.Priority = Enum.AnimationPriority.Movement
- track.Looped = true
- track:Play()
- end)
- UIS.InputBegan:Connect(function(input)
- if tool.Parent == game.Players.LocalPlayer.Character then
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- local bullet = LoadCustomInstance("rbxassetid://11713884211") --The *bullet model id*
- bullet.Anchored = false
- local HRP = tool.BulletPart
- local Attachment = Instance.new("Attachment", bullet)
- local LV = Instance.new("LinearVelocity", Attachment) -- creating the linear velocity
- LV.MaxForce = math.huge -- no need to worry about this
- LV.VectorVelocity = HRP.CFrame.lookVector * 300 -- change 100 with how fast you want the projectile to go
- LV.Attachment0 = Attachment --Required Attachment
- bullet.Parent = game.Workspace
- bullet.CFrame = tool.BulletPart.CFrame
- tool.Handle.Fire:Play()
- tool.flash.BillboardGui.ImageLabel.Visible = true
- wait(1)
- LV:Destroyw()
- wait(10)
- bullet:Destroy()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement