Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local module = {}
- local mul = 1.05
- local tweenService = game:GetService("TweenService")
- local tween
- local hoverSound = game.ReplicatedStorage.sounds.onHover
- function module.AddBounce(gui :TextButton,changeColor :boolean)
- local originColor = gui.BackgroundColor3
- local originSize = gui.Size
- gui.MouseEnter:Connect(function()
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
- local tweenData = {Size = UDim2.new(originSize.X.Scale * mul,0,originSize.Y.Scale * mul,0)}
- if changeColor then
- tweenData = {Size = UDim2.new(originSize.X.Scale * mul,0,originSize.Y.Scale * mul,0),BackgroundColor3 = Color3.new(0.917647, 0.917647, 0.917647),TextColor3 = Color3.new(0,0,0)}
- end
- --playing the hover sound
- hoverSound:Play()
- tween = tweenService:Create(gui,tweenInfo,tweenData)
- tween:Play()
- gui.MouseLeave:Once(function()
- local tweenInfo = TweenInfo.new(0.1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
- local tweenData = {Size = UDim2.new(originSize.X.Scale,0,originSize.Y.Scale,0)}
- if changeColor then
- tweenData = {Size = UDim2.new(originSize.X.Scale,0,originSize.Y.Scale,0),BackgroundColor3 = originColor,TextColor3 = Color3.new(255,255,255)}
- end
- tween = tweenService:Create(gui,tweenInfo,tweenData)
- tween:Play()
- end)
- end)
- end
- return module
- local module = {}
- --Variables
- local finalSize = UDim2.new(0.750649333, 0, 0.261096597, 0)
- local inititalSize = UDim2.new(0, 0, 0.261096597, 0)
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local typeWriterGui = playerGui.typeWriter
- local holder = typeWriterGui.holder
- local textLabel = holder.textHolder
- local sounds = game.ReplicatedStorage.sounds
- --config
- local delayBetnEachCharacter = 0.1
- local opencloseDelay = 0.5
- --services
- local TweenService = game:GetService("TweenService")
- function module:open()
- local tweenInfo = TweenInfo.new(opencloseDelay,Enum.EasingStyle.Quad,Enum.EasingDirection.In)
- local tweenProperties = {Size = finalSize}
- local tween = TweenService:Create(holder,tweenInfo,tweenProperties)
- tween:Play()
- end
- function module:getWaitingTime()
- return opencloseDelay
- end
- function module:close()
- local tweenInfo = TweenInfo.new(opencloseDelay,Enum.EasingStyle.Quad,Enum.EasingDirection.In)
- local tweenProperties = {Size = inititalSize}
- local tween = TweenService:Create(holder,tweenInfo,tweenProperties)
- tween:Play()
- end
- function module:Write(text :string)
- for i=1,#text do
- local curr = sounds:FindFirstChild("typeWriter"..tostring(math.random(1,3)))
- curr:Play()
- textLabel.Text = string.sub(text, 1, i)
- task.wait(delayBetnEachCharacter)
- end
- end
- return module
- local module = {}
- local gui = script.Parent.damage_indicator.Part
- local debris = game:GetService("Debris")
- function module.add(char)
- local hum = char:WaitForChild("Humanoid")
- local oldHealth = hum.Health
- local hrp = char:WaitForChild("HumanoidRootPart")
- hum.HealthChanged:Connect(function(newHealth)
- if oldHealth>newHealth then
- e(math.floor(newHealth-oldHealth),hrp)
- end
- oldHealth = newHealth
- end)
- end
- function e(num,part)
- local x = math.random(-5,5)
- local y = math.random(-5,5)
- local z = math.random(-5,5)
- local temp = gui:Clone()
- temp.Parent = workspace
- temp.BillboardGui.TextLabel.Text = num
- temp.Position = part.Position + Vector3.new(x,y,z)
- debris:AddItem(temp,2)
- end
- return module
- local module = {}
- local tween = game:GetService("TweenService")
- function module.click(startingpos,targetpos,char)
- local hum = char:WaitForChild("Humanoid")
- hum.WalkSpeed = 0
- hum.JumpPower = 0
- local myPart = Instance.new("Part")
- myPart.Color = Color3.new(0.458824, 0.458824, 0.133333)
- myPart.Parent = game.Workspace
- myPart.CanCollide = false
- myPart.Anchored = true
- myPart.Size = Vector3.new(2,2,0.5)
- myPart.Position = startingpos
- myPart.CFrame = CFrame.lookAt(startingpos,targetpos)
- --casting a ray towards the thing
- local rayStart = startingpos
- local rayDirection = (targetpos-startingpos)
- local rayParms = RaycastParams.new()
- rayParms.FilterDescendantsInstances = {char,myPart}
- rayParms.FilterType = Enum.RaycastFilterType.Exclude
- rayParms.IgnoreWater = true
- local raycastResult = workspace:Raycast(rayStart, rayDirection,rayParms)
- repeat wait() until raycastResult
- print(raycastResult.Instance)
- local armlength = 100 --studs
- local deltaSize = Vector3.new(0,0,-armlength)
- --tweening the part
- local goal = {}
- goal.Size = Vector3.new(2,2,armlength)
- goal.Position = myPart.CFrame:PointToWorldSpace(deltaSize/2)
- local Tweenin = TweenInfo.new(armlength/500,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0,true)
- local x = tween:Create(myPart,Tweenin,goal)
- x:Play()
- x.Completed:Connect(function()
- myPart:Destroy()
- hum.WalkSpeed = 16
- hum.JumpPower = 50
- end)
- end
- function fling(char)
- local hrp = char:WaitForChild("HumanoidRootPart")
- hrp.AssemblyLinearVelocity = Vector3.new(math.random(1,100),math.random(1,100),math.random(1,100))
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement